Re: [Intel-gfx] [PATCH] drm/i915: fix header test with GCOV

2020-02-21 Thread Randy Dunlap
On 2/21/20 9:49 PM, Masahiro Yamada wrote: > On Sat, Feb 22, 2020 at 2:25 PM Randy Dunlap wrote: >> >> On 2/21/20 8:53 PM, Masahiro Yamada wrote: >>> On Sat, Feb 22, 2020 at 1:43 PM Masahiro Yamada >>> wrote: Hi Jani, On Fri, Feb 21, 2020 at 7:54 PM Jani Nikula wrote: >

Re: [Intel-gfx] [PATCH] drm/i915: fix header test with GCOV

2020-02-21 Thread Randy Dunlap
On 2/21/20 8:53 PM, Masahiro Yamada wrote: > On Sat, Feb 22, 2020 at 1:43 PM Masahiro Yamada wrote: >> >> Hi Jani, >> >> On Fri, Feb 21, 2020 at 7:54 PM Jani Nikula wrote: >>> >>> $(CC) with $(CFLAGS_GCOV) assumes the output filename with .gcno suffix >>> appended is writable. This is not the

[Intel-gfx] ✓ Fi.CI.IGT: success for Security mitigation for Intel Gen7/7.5 HWs

2020-02-21 Thread Patchwork
== Series Details == Series: Security mitigation for Intel Gen7/7.5 HWs URL : https://patchwork.freedesktop.org/series/73686/ State : success == Summary == CI Bug Log - changes from CI_DRM_7969_full -> Patchwork_16639_full Summary ---

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/8] drm/i915/tgl: Extend Wa_1409825376 stepping

2020-02-21 Thread Patchwork
== Series Details == Series: series starting with [1/8] drm/i915/tgl: Extend Wa_1409825376 stepping URL : https://patchwork.freedesktop.org/series/73802/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16675

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/tgl: Add Wa_1608008084

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/tgl: Add Wa_1608008084 URL : https://patchwork.freedesktop.org/series/73801/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16674 Summary --- **SUCCESS** No

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Push the GPU cancellation to the backend (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/gt: Push the GPU cancellation to the backend (rev2) URL : https://patchwork.freedesktop.org/series/73800/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16673 Summary

Re: [Intel-gfx] [PATCH 01/52] mm/sl[uo]b: export __kmalloc_track(_node)_caller

2020-02-21 Thread Christopher Lameter
On Wed, 19 Feb 2020, Daniel Vetter wrote: > slab does this already, and I want to use this in a memory allocation > tracker in drm for stuff that's tied to the lifetime of a drm_device, > not the underlying struct device. Kinda like devres, but for drm. Would be better to export it without

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Avoid recursing onto active vma from the shrinker

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915: Avoid recursing onto active vma from the shrinker URL : https://patchwork.freedesktop.org/series/73799/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16672 Summary

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/ehl: Donot reuse icl get and put dplls (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/ehl: Donot reuse icl get and put dplls (rev2) URL : https://patchwork.freedesktop.org/series/73681/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7968_full -> Patchwork_16638_full

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/psr: Force PSR probe only after full initialization (rev7)

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/psr: Force PSR probe only after full initialization (rev7) URL : https://patchwork.freedesktop.org/series/73436/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16671

[Intel-gfx] ✓ Fi.CI.BAT: success for drm managed resources, v2

2020-02-21 Thread Patchwork
== Series Details == Series: drm managed resources, v2 URL : https://patchwork.freedesktop.org/series/73794/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16670 Summary --- **SUCCESS** No

Re: [Intel-gfx] [PATCH] drm/i915/tgl: add Wa_1409085225, Wa_14010229206

2020-02-21 Thread kbuild test robot
Hi Matt, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip v5.6-rc2 next-20200221] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm managed resources, v2

2020-02-21 Thread Patchwork
== Series Details == Series: drm managed resources, v2 URL : https://patchwork.freedesktop.org/series/73794/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: mm/sl[uo]b: export __kmalloc_track(_node)_caller Okay!

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm managed resources, v2

2020-02-21 Thread Patchwork
== Series Details == Series: drm managed resources, v2 URL : https://patchwork.freedesktop.org/series/73794/ State : warning == Summary == $ dim checkpatch origin/drm-tip d65ee94cba2c mm/sl[uo]b: export __kmalloc_track(_node)_caller -:58: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by:

[Intel-gfx] [PATCH 8/8] drm/i915/tgl: Extend Wa_1409767108 to B0

2020-02-21 Thread José Roberto de Souza
This Wa will also be needed by B0 stepping. BSpec: 52890 Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c

[Intel-gfx] [PATCH 1/8] drm/i915/tgl: Extend Wa_1409825376 stepping

2020-02-21 Thread José Roberto de Souza
This workaround is only fixed in C0 stepping to extend it to B0 too. BSpec: 52890 Cc: Radhakrishna Sripada Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[Intel-gfx] [PATCH 5/8] drm/i915/tgl: Extend Wa_1606931601 for all steppings

2020-02-21 Thread José Roberto de Souza
From: Anusha Srivatsa According to BSpec. Wa_1606931601 applies for all TGL steppings.This patch moves the WA implementation out of A0 only block of rcs_engine_wa_init(). The WA is has also been referred to by an alternate name Wa_1607090982. Bspec: 46045, 52890 Fixes: 3873fd1a43c7

[Intel-gfx] [PATCH 4/8] drm/i915/tgl: Add Wa_1409085225, Wa_14010229206

2020-02-21 Thread José Roberto de Souza
From: Matt Atwood Disable Push Constant buffer addition for TGL. v2: typos, add additional Wa reference v3: use REG_BIT macro, move to rcs_engine_wa_init, clean up commit message. Bspec: 52890 Cc: Rafael Antognolli Cc: Matt Roper Signed-off-by: Matt Atwood Signed-off-by: José Roberto de

[Intel-gfx] [PATCH 2/8] drm/i915/tgl: Implement Wa_1409804808

2020-02-21 Thread José Roberto de Souza
This workaround the CS not done issue on PIPE_CONTROL. BSpec: 52890 BSpec: 46218 Cc: Matt Roper Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 ++ drivers/gpu/drm/i915/i915_reg.h | 5 +++-- 2 files changed, 9 insertions(+), 2

[Intel-gfx] [PATCH 3/8] drm/i915/tgl: Implement Wa_1806527549

2020-02-21 Thread José Roberto de Souza
This will whitelist the HIZ_CHICKEN register so mesa can disable the optimizations and void hang when using D16_UNORM. Cc: Matt Roper Cc: Rafael Antognolli Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 drivers/gpu/drm/i915/i915_reg.h

[Intel-gfx] [PATCH 7/8] drm/i915/tgl: Add note about Wa_1607063988

2020-02-21 Thread José Roberto de Souza
This issue workaround in Wa_1607063988 has the same fix as Wa_1607138336, so just adding a note in the code. Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[Intel-gfx] [PATCH 6/8] drm/i915/tgl: Add note to Wa_1607297627

2020-02-21 Thread José Roberto de Souza
Add note about the confliting information in BSpec about this WA. BSpec: 52890 Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: Verify LRC isolation

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/selftests: Verify LRC isolation URL : https://patchwork.freedesktop.org/series/73788/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16669 Summary ---

Re: [Intel-gfx] [PATCH] drm/i915/tgl: Add Wa_1608008084

2020-02-21 Thread Lucas De Marchi
On Fri, Feb 21, 2020 at 04:36:53PM -0800, Jose Souza wrote: + CCing people involved in the patch fixed. On Fri, 2020-02-21 at 16:28 -0800, Lucas De Marchi wrote: Wa_1608008084 is an additional WA that applies to writes on FF_MODE2 register. We can't read it back either from CPU or GPU. Since

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Verify LRC isolation

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/selftests: Verify LRC isolation URL : https://patchwork.freedesktop.org/series/73788/ State : warning == Summary == $ dim checkpatch origin/drm-tip 14585105911e drm/i915/selftests: Verify LRC isolation -:123: CHECK:PARENTHESIS_ALIGNMENT: Alignment should

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [resend,1/2] drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight()

2020-02-21 Thread Patchwork
== Series Details == Series: series starting with [resend,1/2] drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight() URL : https://patchwork.freedesktop.org/series/73784/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16668

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2) URL : https://patchwork.freedesktop.org/series/73665/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16667

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [resend,1/2] drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight()

2020-02-21 Thread Patchwork
== Series Details == Series: series starting with [resend,1/2] drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight() URL : https://patchwork.freedesktop.org/series/73784/ State : warning == Summary == $ dim checkpatch origin/drm-tip 8beab9ed3934 drm/i915: panel:

Re: [Intel-gfx] [PATCH v4 00/14] drm/i915: Add support for HDCP 1.4 over MST connectors

2020-02-21 Thread Li, Juston
On Tue, 2020-02-18 at 17:02 -0500, Sean Paul wrote: > From: Sean Paul > > Hey all, > Back with a v4. Rebased on latest drm-tip. > > Biggest change was adding the QUERY_STREAM_ENCRYPTION_STATUS check > which > ensures not only the link to the first branch is encrypted, but also > that the

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2) URL : https://patchwork.freedesktop.org/series/73665/ State : warning == Summary == $ dim checkpatch origin/drm-tip bbe4554189c9 dma-buf: add dynamic DMA-buf handling v15 -:10:

Re: [Intel-gfx] [PATCH] drm/i915/tgl: Add Wa_1608008084

2020-02-21 Thread Souza, Jose
+ CCing people involved in the patch fixed. On Fri, 2020-02-21 at 16:28 -0800, Lucas De Marchi wrote: > Wa_1608008084 is an additional WA that applies to writes on FF_MODE2 > register. We can't read it back either from CPU or GPU. Since the > other > bits should be 0, recommendation to handle

Re: [Intel-gfx] [PATCH] drm/i915/gt: Push the GPU cancellation to the backend

2020-02-21 Thread Andi Shyti
Hi Chris, On Fri, Feb 21, 2020 at 11:51:35PM +, Chris Wilson wrote: > Upon unregistering the user interface, we mark the GPU as wedged to > ensure we push no new work to the GPU, and to flush all current work > from the GPU. Move this call to the GT backend. > > Signed-off-by: Chris Wilson

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Correctly terminate connector iteration

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915: Correctly terminate connector iteration URL : https://patchwork.freedesktop.org/series/73779/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_1 Summary ---

[Intel-gfx] [PATCH] drm/i915/tgl: Add Wa_1608008084

2020-02-21 Thread Lucas De Marchi
Wa_1608008084 is an additional WA that applies to writes on FF_MODE2 register. We can't read it back either from CPU or GPU. Since the other bits should be 0, recommendation to handle Wa_1604555607 is to actually just write the timer value. Do a write only and don't try to read it, neither before

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/huc: Fix error reported by I915_PARAM_HUC_STATUS (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/huc: Fix error reported by I915_PARAM_HUC_STATUS (rev2) URL : https://patchwork.freedesktop.org/series/72419/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16665

[Intel-gfx] [PATCH] drm/i915/gt: Push the GPU cancellation to the backend

2020-02-21 Thread Chris Wilson
Upon unregistering the user interface, we mark the GPU as wedged to ensure we push no new work to the GPU, and to flush all current work from the GPU. Move this call to the GT backend. Signed-off-by: Chris Wilson Cc: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt.c | 7 +++

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/hotplug: Use phy to get the hpd_pin instead of the port (rev4)

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/hotplug: Use phy to get the hpd_pin instead of the port (rev4) URL : https://patchwork.freedesktop.org/series/72747/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7967_full -> Patchwork_16637_full

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Use intel_plane_data_rate for min_cdclk calculation (rev3)

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915: Use intel_plane_data_rate for min_cdclk calculation (rev3) URL : https://patchwork.freedesktop.org/series/73718/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7983 -> Patchwork_16664

Re: [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/tgl: Add Wa_22010178259:tgl (rev2)

2020-02-21 Thread Matt Roper
On Fri, Feb 21, 2020 at 10:45:07PM +, Patchwork wrote: > == Series Details == > > Series: drm/i915/tgl: Add Wa_22010178259:tgl (rev2) > URL : https://patchwork.freedesktop.org/series/73255/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_7967_full ->

[Intel-gfx] [PATCH] drm/i915/gt: Push the GPU cancellation to the backend

2020-02-21 Thread Chris Wilson
Upon unregistering the user interface, we mark the GPU as wedged to ensure we push no new work to the GPU, and to flush all current work from the GPU. Move this call to the GT backend. Signed-off-by: Chris Wilson Cc: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt.c | 7 +++

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/tgl: Add Wa_22010178259:tgl (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/tgl: Add Wa_22010178259:tgl (rev2) URL : https://patchwork.freedesktop.org/series/73255/ State : success == Summary == CI Bug Log - changes from CI_DRM_7967_full -> Patchwork_16634_full Summary ---

[Intel-gfx] [CI] drm/i915: Avoid recursing onto active vma from the shrinker

2020-02-21 Thread Chris Wilson
We mark the vma as active while binding it in order to protect outselves from being shrunk under mempressure. This only works if we are strict in not attempting to shrink active objects. <6> [472.618968] Workqueue: events_unbound fence_work [i915] <4> [472.618970] Call Trace: <4> [472.618974] ?

[Intel-gfx] ✓ Fi.CI.BAT: success for dma-buf: Precheck for a valid dma_fence before acquiring the reference

2020-02-21 Thread Patchwork
== Series Details == Series: dma-buf: Precheck for a valid dma_fence before acquiring the reference URL : https://patchwork.freedesktop.org/series/73772/ State : success == Summary == CI Bug Log - changes from CI_DRM_7983 -> Patchwork_16663

Re: [Intel-gfx] [PATCH i-g-t v4 2/2] i915/gem_ctx_isolation: Check engine relative registers (revised)

2020-02-21 Thread Fosha, Robert M
On 2/14/20 6:33 PM, Dale B Stimson wrote: From: Chris Wilson Some of the non-privileged registers are at the same offset on each engine. We can improve our coverage for unknown HW layout by using the reported engine->mmio_base for relative offsets. Subsequent to sign-off by Chris Wilson,

Re: [Intel-gfx] [PATCH i-g-t v4 1/2] i915/gem_mmio_base.c - get mmio_base from debugfs (if possible)

2020-02-21 Thread Fosha, Robert M
On 2/14/20 6:33 PM, Dale B Stimson wrote: Signed-off-by: Dale B Stimson Acked-by: Robert M. Fosha --- lib/Makefile.sources | 2 + lib/i915/gem_mmio_base.c | 353 +++ lib/i915/gem_mmio_base.h | 19 +++ lib/igt.h| 1 +

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gt: Protect signaler walk with RCU (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: drm/i915/gt: Protect signaler walk with RCU (rev2) URL : https://patchwork.freedesktop.org/series/73601/ State : success == Summary == CI Bug Log - changes from CI_DRM_7967_full -> Patchwork_16633_full Summary

[Intel-gfx] ✓ Fi.CI.BAT: success for Refactor Gen11+ SAGV support (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: Refactor Gen11+ SAGV support (rev2) URL : https://patchwork.freedesktop.org/series/73703/ State : success == Summary == CI Bug Log - changes from CI_DRM_7983 -> Patchwork_16662 Summary --- **SUCCESS**

Re: [Intel-gfx] [PATCH 02/51] drm/i915: Don't clear drvdata in ->release

2020-02-21 Thread Chris Wilson
Quoting Daniel Vetter (2020-02-21 21:02:30) > For two reasons: > > - The driver core clears this already for us after we're unloaded in > __device_release_driver(). Even if we abort before loading? History notes that i915_pci_remove was called with a stale pointer on error. -Chris

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Refactor Gen11+ SAGV support (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: Refactor Gen11+ SAGV support (rev2) URL : https://patchwork.freedesktop.org/series/73703/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: drm/i915: Start passing latency as parameter Okay! Commit: drm/i915: Introduce

[Intel-gfx] [PATCH v4-CI] drm/i915/psr: Force PSR probe only after full initialization

2020-02-21 Thread José Roberto de Souza
Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR") was forcing the state compute too earlier causing errors because not everything was initialized, so here moving to the end of i915_driver_modeset_probe() when the display is all initialized. Also fixing the

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Refactor Gen11+ SAGV support (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: Refactor Gen11+ SAGV support (rev2) URL : https://patchwork.freedesktop.org/series/73703/ State : warning == Summary == $ dim checkpatch origin/drm-tip ba1e4cbe4558 drm/i915: Start passing latency as parameter 2712b33bd072 drm/i915: Introduce skl_plane_wm_level

Re: [Intel-gfx] [PATCH v4] drm/i915/psr: Force PSR probe only after full initialization

2020-02-21 Thread Mun, Gwan-gyeong
On Fri, 2020-02-21 at 12:11 -0800, Souza, Jose wrote: > On Fri, 2020-02-21 at 20:04 +, Mun, Gwan-gyeong wrote: > > On Thu, 2020-02-20 at 15:15 -0800, José Roberto de Souza wrote: > > > Commit 60c6a14b489b ("drm/i915/display: Force the state compute > > > phase > > > once to enable PSR") was

[Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/3] drm/i915: Flush idle barriers when waiting (rev2)

2020-02-21 Thread Patchwork
== Series Details == Series: series starting with [1/3] drm/i915: Flush idle barriers when waiting (rev2) URL : https://patchwork.freedesktop.org/series/73751/ State : failure == Summary == Applying: drm/i915: Flush idle barriers when waiting Applying: drm/i915: Allow userspace to specify

Re: [Intel-gfx] [PATCH 52/52] drm: Add docs for managed resources

2020-02-21 Thread Sam Ravnborg
Hi Daniel. > What I miss in all of this is how do other subsystems deal > with the different lifetime of their stuff? > Or maybe only drm really has this issue? > Anything we could learn from others? Reading through the thread - this is all covered in more than sufficient details in other mails.

[Intel-gfx] [PATCH 41/51] drm/tidss: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside:

[Intel-gfx] [PATCH 44/51] drm/gm12u320: Use helpers for shutdown/suspend/resume

2020-02-21 Thread Daniel Vetter
Also there's a race in the disconnect implemenation. First shut down, then unplug, leaves a window where userspace could sneak in and restart the entire machinery. With this we can also delete the very un-atomic global pipe_enabled tracking. Signed-off-by: Daniel Vetter Cc: Hans de Goede Cc:

[Intel-gfx] [PATCH 34/51] drm/meson: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: This

[Intel-gfx] [PATCH 48/51] drm/mipi-dbi: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
Allows us to drop the drm_driver.release callback from all drivers, and remove the mipi_dbi_release() function. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on

[Intel-gfx] [PATCH 47/51] drm/mipi-dbi: Move drm_mode_config_init into mipi library

2020-02-21 Thread Daniel Vetter
7/7 drivers agree that's the right choice, let's do this. This avoids duplicating the same old error checking code over all 7 drivers, which is the motivation here. Reviewed-by: Noralf Trønnes Tested-by: Noralf Trønnes Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc:

[Intel-gfx] [PATCH 42/51] drm/gm12u320: More drmm_

2020-02-21 Thread Daniel Vetter
The drm_mode_config_cleanup call we can drop, and all the allocations we can switch over to drmm_kzalloc. Unfortunately the work queue is still present, so can't get rid of the drm_driver->release function outright. Signed-off-by: Daniel Vetter Cc: Hans de Goede Cc: "Noralf Trønnes" ---

[Intel-gfx] [PATCH 46/51] drm/repaper: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
Allows us to drop the drm_driver.release callback. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init().

[Intel-gfx] [PATCH 40/51] drm/mtk: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside:

[Intel-gfx] [PATCH 51/51] drm: Add docs for managed resources

2020-02-21 Thread Daniel Vetter
All collected together to provide a consistent story in one patch, instead of the somewhat bumpy refactor-evolution leading to this. Also some thoughts on what the next steps could be: - Create a macro called devm_drm_dev_alloc() which essentially wraps the kzalloc(); devm_drm_dev_init();

[Intel-gfx] [PATCH 31/51] drm/ingenic: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
Allows us to drop the drm_driver.release callback. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init().

[Intel-gfx] [PATCH 21/51] drm: Use drmm_ for drm_dev_init cleanup

2020-02-21 Thread Daniel Vetter
Well for the simple stuff at least, vblank, gem and minor cleanup I want to further split up as a demonstration. v2: We need to clear drm_device->dev otherwise the debug drm printing after our cleanup hook (e.g. in drm_manged_release) will chase released memory and result in a use-after-free. Not

[Intel-gfx] [PATCH 45/51] drm/gm12u320: Simplify upload work

2020-02-21 Thread Daniel Vetter
Instead of having a work item that never stops (which really should be a kthread), with a dedicated workqueue to not upset anyone else, use a delayed work. A bunch of changes: - We can throw out all the custom wakeup and requeue logic and state tracking. If we schedule the work with a 0 delay

[Intel-gfx] [PATCH 43/51] drm/gm12u320: Use devm_drm_dev_init

2020-02-21 Thread Daniel Vetter
Only drops the drm_dev_put, but hey a few lines! Signed-off-by: Daniel Vetter Cc: Hans de Goede Cc: "Noralf Trønnes" --- drivers/gpu/drm/tiny/gm12u320.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c

[Intel-gfx] [PATCH 27/51] drm/bochs: Remove leftover drm_atomic_helper_shutdown

2020-02-21 Thread Daniel Vetter
Small mistake that crept into commit 81da8c3b8d3df6f05b11300b7d17ccd1f3017fab Author: Gerd Hoffmann Date: Tue Feb 11 14:52:18 2020 +0100 drm/bochs: add drm_driver.release callback where drm_atomic_helper_shutdown was left in both places. The ->release callback really shouldn't touch

[Intel-gfx] [PATCH 39/51] drm/shmob: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside:

[Intel-gfx] [PATCH 29/51] drm/cirrus: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
We can even delete the drm_driver.release hook now! This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for

[Intel-gfx] [PATCH 33/51] drm/mcde: More devm_drm_dev_init

2020-02-21 Thread Daniel Vetter
Auto-unwind ftw, now possible with the fixed drm_device related management. Aside, clk/regulator seem to be missing devm versions for a bunch of functions, preventing a pile of these simpler drivers from outright losing their ->remove hook. Reviewed-by: Linus Walleij Signed-off-by: Daniel

[Intel-gfx] [PATCH 24/51] drm: Manage drm_vblank_cleanup with drmm_

2020-02-21 Thread Daniel Vetter
Nothing special here, except that this is the first time that we automatically clean up something that's initialized with an explicit driver call. But the cleanup was done at the very of the release sequence for all drivers, and that's still the case. At least without more uses of drmm_ through

[Intel-gfx] [PATCH 50/51] drm/udl: drop drm_driver.release hook

2020-02-21 Thread Daniel Vetter
There's only two functions called from that: drm_kms_helper_poll_fini() and udl_free_urb_list(). Both of these are also called from the ubs_driver->disconnect hook, so entirely pointless to do the same again in the ->release hook. Furthermore by the time we clean up the drm_driver we really

[Intel-gfx] [PATCH 19/51] drm: Cleanups after drmm_add_final_kfree rollout

2020-02-21 Thread Daniel Vetter
A few things: - Update the example driver in the documentation. - We can drop the old kfree in drm_dev_release. - Add a WARN_ON check in drm_dev_register to make sure everyone calls drmm_add_final_kfree and there's no leaks. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 11

[Intel-gfx] [PATCH 23/51] drm: Manage drm_gem_init with drmm_

2020-02-21 Thread Daniel Vetter
We might want to look into pushing this down into drm_mm_init, but that would mean rolling out return codes to a pile of functions unfortunately. So let's leave that for now. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 8 +--- drivers/gpu/drm/drm_gem.c | 21

[Intel-gfx] [PATCH 30/51] drm/cirrus: Fully embrace devm_

2020-02-21 Thread Daniel Vetter
With the drm_device lifetime fun cleaned up there's nothing in the way anymore to use devm_ for everything hw releated. Do it, and in the process, throw out the entire onion unwinding. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: "Noralf Trønnes" Cc:

[Intel-gfx] [PATCH 25/51] drm: Garbage collect drm_dev_fini

2020-02-21 Thread Daniel Vetter
It has become empty. Given the few users I figured not much point splitting this up. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/cirrus/cirrus.c | 1 - drivers/gpu/drm/drm_drv.c | 23 +-- drivers/gpu/drm/drm_mipi_dbi.c| 1

[Intel-gfx] [PATCH 38/51] drm/stm: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside:

[Intel-gfx] [PATCH 35/51] drm/pl111: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: This

[Intel-gfx] [PATCH 36/51] drm/rcar-du: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside:

[Intel-gfx] [PATCH 26/51] drm: Manage drm_mode_config_init with drmm_

2020-02-21 Thread Daniel Vetter
drm_mode_config_cleanup is idempotent, so no harm in calling this twice. This allows us to gradually switch drivers over by removing explicit drm_mode_config_cleanup calls. With this step it's not also possible that (at least for simple drivers) automatic resource cleanup can be done correctly

[Intel-gfx] [PATCH 37/51] drm/rockchip: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's (almost, there's some iommu stuff without significance) right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup

[Intel-gfx] [PATCH 32/51] drm/mcde: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
Allows us to drop the drm_driver.release callback. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init().

[Intel-gfx] [PATCH 49/51] drm/udl: Drop explicit drm_mode_config_cleanup call

2020-02-21 Thread Daniel Vetter
It's right above the drm_dev_put(). This allows us to delete a bit of onion unwinding in udl_modeset_init(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final

[Intel-gfx] [PATCH 20/51] drm: Handle dev->unique with drmm_

2020-02-21 Thread Daniel Vetter
We need to add a drmm_kstrdup for this, but let's start somewhere. This is not exactly perfect onion unwinding, but it's jsut a kfree so doesn't really matter at all. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 5 ++--- drivers/gpu/drm/drm_managed.c | 16

[Intel-gfx] [PATCH 22/51] drm: manage drm_minor cleanup with drmm_

2020-02-21 Thread Daniel Vetter
The cleanup here is somewhat tricky, since we can't tell apart the allocated minor index from 0. So register a cleanup action first, and if the index allocation fails, unregister that cleanup action again to avoid bad mistakes. The kdev for the minor already handles NULL, so no problem there.

[Intel-gfx] [PATCH 28/51] drm/bochs: Drop explicit drm_mode_config_cleanup

2020-02-21 Thread Daniel Vetter
Instead rely on the automatic clean, for which we just need to check that drm_mode_config_init succeeded. To avoid an inversion in the cleanup we also have to move the dev_private allocation over to drmm_kzalloc. This is made possible by a preceeding patch which added a drmm_ cleanup action to

[Intel-gfx] [PATCH 15/51] drm/repaper: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Reviewed-by: Noralf Trønnes Signed-off-by: Daniel Vetter Cc: "Noralf Trønnes" --- drivers/gpu/drm/tiny/repaper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tiny/repaper.c

[Intel-gfx] [PATCH 17/51] drm/gm12u320: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Hans de Goede --- drivers/gpu/drm/tiny/gm12u320.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c index

[Intel-gfx] [PATCH 05/51] drm/mipi_dbi: Use drmm_add_final_kfree in all drivers

2020-02-21 Thread Daniel Vetter
They all share mipi_dbi_release so we need to switch them all together. With this we can drop the final kfree from the release function. Aside, I think we could perhaps have a tiny additional helper for these mipi_dbi drivers, the first few lines around devm_drm_dev_init are all the same (except

[Intel-gfx] [PATCH 11/51] drm/tidss: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Jyri Sarha Cc: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c

[Intel-gfx] [PATCH 08/51] drm/i915: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. The mock device in the selftests needed it's pci_device split up from the drm_device. In the future we could simplify this again by allocating the pci_device as a managed allocation too. v2: I overlooked that i915_driver_destroy is

[Intel-gfx] [PATCH 06/51] drm/udl: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. v2: We need drm_dev_put to unroll the driver creation (once drm_dev_init and drmm_add_final_kfree suceeded), otherwise the drmm_ magic doesn't happen. v3: Actually squash in the fixup (Laurent). Signed-off-by: Daniel Vetter Cc:

[Intel-gfx] [PATCH 16/51] drm/inigenic: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c

[Intel-gfx] [PATCH 13/51] drm/vgem: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. v2: After drm_dev_init/drmm_add_final_kfree we need to clean up everything through a drm_dev_put. Rework the unwind code to match that. Signed-off-by: Daniel Vetter Cc: Daniel Vetter Cc: Emil Velikov Cc: Chris Wilson Cc: Sean

[Intel-gfx] [PATCH 01/51] mm/sl[uo]b: export __kmalloc_track(_node)_caller

2020-02-21 Thread Daniel Vetter
slab does this already, and I want to use this in a memory allocation tracker in drm for stuff that's tied to the lifetime of a drm_device, not the underlying struct device. Kinda like devres, but for drm. Acked-by: Andrew Morton Signed-off-by: Daniel Vetter Cc: Christoph Lameter Cc: Pekka

[Intel-gfx] [PATCH 18/51] drm/: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
These are the leftover drivers that didn't have a ->release hook that needed to be updated. Signed-off-by: Daniel Vetter Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Russell King Cc: Hans de Goede --- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 2 ++

[Intel-gfx] [PATCH 10/51] drm/v3d: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. I also noticed that the unwind code is wrong, after drm_dev_init the drm_device owns the v3d allocation, so the kfree(v3d) is a double-free. Reorder the setup to fix this issue. After a bit more prep in drivers and drm core v3d

[Intel-gfx] [PATCH 09/51] drm/cirrus: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. I also noticed that cirrus forgot to call drm_dev_fini(). v2: Don't call kfree(cirrus) after we've handed overship of that to drm_device and the drmm_ stuff. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc:

[Intel-gfx] [PATCH 07/51] drm/qxl: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-de...@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 2

  1   2   3   >