Patch is reported at http://marc.info/?l=linux-tegra&m=145633528825832&w=2 This will fix boot on kernel 4.3+ as experienced with fedora kernel 4.3.5
Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c29f7cc0 [00000000] *pgd=00000000 Internal error: Oops: 205 [#1] SMP ARM Modules linked in: gpio_keys(+) phy_tegra_usb(+) ahci_tegra libahci_platform nouveau(+) rtc_tegra i2c_algo_bit i2c_tegra tegra_drm ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm host1x mmc_block sdhci_tegra sdhci_pltfm sdhci mmc_core CPU: 2 PID: 318 Comm: systemd-udevd Not tainted 4.4.2-300.fc23.armv7hl+lpae #1 Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) task: edc67500 ti: c28ae000 task.ti: c28ae000 PC is at __list_del_entry+0x40/0x94 LR is at list_del+0xc/0x1c pc : [<c035b498>] lr : [<c035b4f8>] psr: 80010013 sp : c28afd08 ip : 00000020 fp : c28aff58 r10: c242d488 r9 : 0000001b r8 : c0b4d528 r7 : c28afd6c r6 : ffffffff r5 : c28afd6c r4 : c288b02c r3 : c288b02c r2 : 00000000 r1 : 00000000 r0 : c288b02c Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 30c5387d Table: 829f7cc0 DAC: 55555555 Process systemd-udevd (pid: 318, stack limit = 0xc28ae220) --- drm-nouveau-platform-fix_deferred_probe.patch | 114 +++++++++++++++++++++++++ kernel.spec | 3 + 2 files changed, 117 insertions(+), 0 deletions(-) create mode 100644 drm-nouveau-platform-fix_deferred_probe.patch
diff --git a/drm-nouveau-platform-fix_deferred_probe.patch b/drm-nouveau-platform-fix_deferred_probe.patch new file mode 100644 index 0000000..36aeb91 --- /dev/null +++ b/drm-nouveau-platform-fix_deferred_probe.patch @@ -0,0 +1,114 @@ +From: Thierry Reding thierry.reding@gmail.com +To: Ben Skeggs bskeggs@redhat.com +Cc: Alexandre Courbot gnurou@gmail.com, + Nicolas Chauvet kwizart@gmail.com, + dri-devel@lists.freedesktop.org, + linux-tegra@vger.kernel.org +Subject: [PATCH] drm/nouveau: platform: Fix deferred probe +Date: Wed, 24 Feb 2016 18:34:43 +0100 +Message-Id: 1456335283-22097-1-git-send-email-thierry.reding@gmail.com +X-Mailer: git-send-email 2.7.1 + +From: Thierry Reding treding@nvidia.com + +The error cleanup paths aren't quite correct and will crash upon +deferred probe. + +Cc: stable@vger.kernel.org # v4.3+ +Signed-off-by: Thierry Reding treding@nvidia.com +--- + drivers/gpu/drm/nouveau/nouveau_platform.c | 2 +- + drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 40 ++++++++++++++++------ + 2 files changed, 30 insertions(+), 12 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c +index 8a70cec59bcd..2dfe58af12e4 100644 +--- a/drivers/gpu/drm/nouveau/nouveau_platform.c ++++ b/drivers/gpu/drm/nouveau/nouveau_platform.c +@@ -24,7 +24,7 @@ + static int nouveau_platform_probe(struct platform_device *pdev) + { + const struct nvkm_device_tegra_func *func; +- struct nvkm_device *device; ++ struct nvkm_device *device = NULL; + struct drm_device *drm; + int ret; + +diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +index 7f8a42721eb2..e7e581d6a8ff 100644 +--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c ++++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +@@ -252,32 +252,40 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, + + if (!(tdev = kzalloc(sizeof(*tdev), GFP_KERNEL))) + return -ENOMEM; +- *pdevice = &tdev->device; ++ + tdev->func = func; + tdev->pdev = pdev; + tdev->irq = -1; + + tdev->vdd = devm_regulator_get(&pdev->dev, "vdd"); +- if (IS_ERR(tdev->vdd)) +- return PTR_ERR(tdev->vdd); ++ if (IS_ERR(tdev->vdd)) { ++ ret = PTR_ERR(tdev->vdd); ++ goto free; ++ } + + tdev->rst = devm_reset_control_get(&pdev->dev, "gpu"); +- if (IS_ERR(tdev->rst)) +- return PTR_ERR(tdev->rst); ++ if (IS_ERR(tdev->rst)) { ++ ret = PTR_ERR(tdev->rst); ++ goto free; ++ } + + tdev->clk = devm_clk_get(&pdev->dev, "gpu"); +- if (IS_ERR(tdev->clk)) +- return PTR_ERR(tdev->clk); ++ if (IS_ERR(tdev->clk)) { ++ ret = PTR_ERR(tdev->clk); ++ goto free; ++ } + + tdev->clk_pwr = devm_clk_get(&pdev->dev, "pwr"); +- if (IS_ERR(tdev->clk_pwr)) +- return PTR_ERR(tdev->clk_pwr); ++ if (IS_ERR(tdev->clk_pwr)) { ++ ret = PTR_ERR(tdev->clk_pwr); ++ goto free; ++ } + + nvkm_device_tegra_probe_iommu(tdev); + + ret = nvkm_device_tegra_power_up(tdev); + if (ret) +- return ret; ++ goto remove; + + tdev->gpu_speedo = tegra_sku_info.gpu_speedo_value; + ret = nvkm_device_ctor(&nvkm_device_tegra_func, NULL, &pdev->dev, +@@ -285,9 +293,19 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, + cfg, dbg, detect, mmio, subdev_mask, + &tdev->device); + if (ret) +- return ret; ++ goto powerdown; ++ ++ *pdevice = &tdev->device; + + return 0; ++ ++powerdown: ++ nvkm_device_tegra_power_down(tdev); ++remove: ++ nvkm_device_tegra_remove_iommu(tdev); ++free: ++ kfree(tdev); ++ return ret; + } + #else + int +-- +2.7.1 diff --git a/kernel.spec b/kernel.spec index a5a6997..edbb653 100644 --- a/kernel.spec +++ b/kernel.spec @@ -604,6 +604,9 @@ Patch646: HID-sony-do-not-bail-out-when-the-sixaxis-refuses-th.patch #rhbz 1288684 Patch647: 0001-vsock-Fix-blocking-ops-call-in-prepare_to_wait.patch
+# Fix nouveau on arm for 4.3+ +Patch658: drm-nouveau-platform-fix_deferred_probe.patch + # END OF PATCH DEFINITIONS
%endif
Le 25 févr. 2016 10:14, "Nicolas Chauvet" kwizart@gmail.com a écrit :
Patch is reported at http://marc.info/?l=linux-tegra&m=145633528825832&w=2 This will fix boot on kernel 4.3+ as experienced with fedora kernel 4.3.5
Unable to handle kernel NULL pointer dereference at virtual address
00000000
pgd = c29f7cc0 [00000000] *pgd=00000000 Internal error: Oops: 205 [#1] SMP ARM Modules linked in: gpio_keys(+) phy_tegra_usb(+) ahci_tegra
libahci_platform nouveau(+) rtc_tegra i2c_algo_bit i2c_tegra tegra_drm ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm host1x mmc_block sdhci_tegra sdhci_pltfm sdhci mmc_core
CPU: 2 PID: 318 Comm: systemd-udevd Not tainted
4.4.2-300.fc23.armv7hl+lpae #1
Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) task: edc67500 ti: c28ae000 task.ti: c28ae000 PC is at __list_del_entry+0x40/0x94 LR is at list_del+0xc/0x1c pc : [<c035b498>] lr : [<c035b4f8>] psr: 80010013 sp : c28afd08 ip : 00000020 fp : c28aff58 r10: c242d488 r9 : 0000001b r8 : c0b4d528 r7 : c28afd6c r6 : ffffffff r5 : c28afd6c r4 : c288b02c r3 : c288b02c r2 : 00000000 r1 : 00000000 r0 : c288b02c Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 30c5387d Table: 829f7cc0 DAC: 55555555 Process systemd-udevd (pid: 318, stack limit = 0xc28ae220)
drm-nouveau-platform-fix_deferred_probe.patch | 114
+++++++++++++++++++++++++
kernel.spec | 3 + 2 files changed, 117 insertions(+), 0 deletions(-) create mode 100644 drm-nouveau-platform-fix_deferred_probe.patch
diff --git a/drm-nouveau-platform-fix_deferred_probe.patch
b/drm-nouveau-platform-fix_deferred_probe.patch
new file mode 100644 index 0000000..36aeb91 --- /dev/null +++ b/drm-nouveau-platform-fix_deferred_probe.patch @@ -0,0 +1,114 @@ +From: Thierry Reding thierry.reding@gmail.com +To: Ben Skeggs bskeggs@redhat.com +Cc: Alexandre Courbot gnurou@gmail.com,
Nicolas Chauvet <kwizart@gmail.com>,dri-devel@lists.freedesktop.org,linux-tegra@vger.kernel.org+Subject: [PATCH] drm/nouveau: platform: Fix deferred probe +Date: Wed, 24 Feb 2016 18:34:43 +0100 +Message-Id: 1456335283-22097-1-git-send-email-thierry.reding@gmail.com +X-Mailer: git-send-email 2.7.1
+From: Thierry Reding treding@nvidia.com
+The error cleanup paths aren't quite correct and will crash upon +deferred probe.
+Cc: stable@vger.kernel.org # v4.3+ +Signed-off-by: Thierry Reding treding@nvidia.com +---
- drivers/gpu/drm/nouveau/nouveau_platform.c | 2 +-
- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 40
++++++++++++++++------
- 2 files changed, 30 insertions(+), 12 deletions(-)
+diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c
b/drivers/gpu/drm/nouveau/nouveau_platform.c
+index 8a70cec59bcd..2dfe58af12e4 100644 +--- a/drivers/gpu/drm/nouveau/nouveau_platform.c ++++ b/drivers/gpu/drm/nouveau/nouveau_platform.c +@@ -24,7 +24,7 @@
- static int nouveau_platform_probe(struct platform_device *pdev)
- {
const struct nvkm_device_tegra_func *func;+- struct nvkm_device *device; ++ struct nvkm_device *device = NULL;
struct drm_device *drm;int ret;+diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+index 7f8a42721eb2..e7e581d6a8ff 100644 +--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c ++++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +@@ -252,32 +252,40 @@ nvkm_device_tegra_new(const struct
nvkm_device_tegra_func *func,
if (!(tdev = kzalloc(sizeof(*tdev), GFP_KERNEL)))return -ENOMEM;+- *pdevice = &tdev->device; ++
tdev->func = func;tdev->pdev = pdev;tdev->irq = -1;tdev->vdd = devm_regulator_get(&pdev->dev, "vdd");+- if (IS_ERR(tdev->vdd)) +- return PTR_ERR(tdev->vdd); ++ if (IS_ERR(tdev->vdd)) { ++ ret = PTR_ERR(tdev->vdd); ++ goto free; ++ }
tdev->rst = devm_reset_control_get(&pdev->dev, "gpu");+- if (IS_ERR(tdev->rst)) +- return PTR_ERR(tdev->rst); ++ if (IS_ERR(tdev->rst)) { ++ ret = PTR_ERR(tdev->rst); ++ goto free; ++ }
tdev->clk = devm_clk_get(&pdev->dev, "gpu");+- if (IS_ERR(tdev->clk)) +- return PTR_ERR(tdev->clk); ++ if (IS_ERR(tdev->clk)) { ++ ret = PTR_ERR(tdev->clk); ++ goto free; ++ }
tdev->clk_pwr = devm_clk_get(&pdev->dev, "pwr");+- if (IS_ERR(tdev->clk_pwr)) +- return PTR_ERR(tdev->clk_pwr); ++ if (IS_ERR(tdev->clk_pwr)) { ++ ret = PTR_ERR(tdev->clk_pwr); ++ goto free; ++ }
nvkm_device_tegra_probe_iommu(tdev);ret = nvkm_device_tegra_power_up(tdev);if (ret)+- return ret; ++ goto remove;
tdev->gpu_speedo = tegra_sku_info.gpu_speedo_value;ret = nvkm_device_ctor(&nvkm_device_tegra_func, NULL, &pdev->dev,+@@ -285,9 +293,19 @@ nvkm_device_tegra_new(const struct
nvkm_device_tegra_func *func,
cfg, dbg, detect, mmio, subdev_mask,&tdev->device);if (ret)+- return ret; ++ goto powerdown; ++ ++ *pdevice = &tdev->device;
return 0;++ ++powerdown: ++ nvkm_device_tegra_power_down(tdev); ++remove: ++ nvkm_device_tegra_remove_iommu(tdev); ++free: ++ kfree(tdev); ++ return ret;
- }
- #else
- int
+-- +2.7.1 diff --git a/kernel.spec b/kernel.spec index a5a6997..edbb653 100644 --- a/kernel.spec +++ b/kernel.spec @@ -604,6 +604,9 @@ Patch646:
HID-sony-do-not-bail-out-when-the-sixaxis-refuses-th.patch
#rhbz 1288684 Patch647: 0001-vsock-Fix-blocking-ops-call-in-prepare_to_wait.patch
+# Fix nouveau on arm for 4.3+ +Patch658: drm-nouveau-platform-fix_deferred_probe.patch
# END OF PATCH DEFINITIONS
%endif
1.7.2.1
Koji scratch build: http://koji.fedoraproject.org/taskinfo?taskID=13117597
On Thu, Feb 25, 2016 at 9:14 AM, Nicolas Chauvet kwizart@gmail.com wrote:
Patch is reported at http://marc.info/?l=linux-tegra&m=145633528825832&w=2 This will fix boot on kernel 4.3+ as experienced with fedora kernel 4.3.5
Thanks, pushed to f23+ at the moment, doesn't apply cleanly to the 4.3 kernek in F22 atm but it should be rebased to 4.4 soonish so we'll ensure it's pulled in then.
Peter
kernel@lists.fedoraproject.org