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

2020-03-02 Thread Thomas Zimmermann
Hi Am 02.03.20 um 23:26 schrieb 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. > > Further

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

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:26:10PM +0100, Daniel Vetter wrote: > 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. Acked-by: Gerd Hoffmann __

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

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:26:08PM +0100, Daniel Vetter wrote: > 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 ma

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

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:26:09PM +0100, Daniel Vetter wrote: > 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

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

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:26:07PM +0100, Daniel Vetter wrote: > 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_shut

[Intel-gfx] [PATCH v4 2/2] drm/i915/hdcp: Fix config_stream_type() ret value

2020-03-02 Thread Anshuman Gupta
DP shim's config_stream_type considered to be succeeded when return value of intel_dp_hdcp2_write_msg() equals to size of message to be written, it makes config_stream_type to return a zero success value in order to succeed the HDCP auth. v2: - config_stream_type() returns 0 on success. [Ram] CC:

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

2020-03-02 Thread Gerd Hoffmann
> @@ -575,9 +574,12 @@ static int cirrus_pci_probe(struct pci_dev *pdev, > > dev = &cirrus->dev; > ret = drm_dev_init(dev, &cirrus_driver, &pdev->dev); > - if (ret) > - goto err_free_cirrus; > + if (ret) { > + kfree(cirrus); > + goto err_pci

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

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:25:47PM +0100, Daniel Vetter wrote: > With this we can drop the final kfree from the release function. Acked-by: Gerd Hoffmann > > Signed-off-by: Daniel Vetter > Cc: Dave Airlie > Cc: Gerd Hoffmann > Cc: virtualizat...@lists.linux-foundation.org > Cc: spice-de...@l

Re: [Intel-gfx] [PATCH 04/51] drm: Set final_kfree in drm_dev_alloc

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:25:44PM +0100, Daniel Vetter wrote: > I also did a full review of all callers, and only the xen driver > forgot to call drm_dev_put in the failure path. Fix that up too. > > v2: I noticed that xen has a drm_driver.release hook, and uses > drm_dev_alloc(). We need to remo

Re: [Intel-gfx] [PATCH v4 2/2] drm/i915/hdcp: Fix config_stream_type() ret value

2020-03-02 Thread Ramalingam C
On 2020-03-03 at 11:22:03 +0530, Anshuman Gupta wrote: > On 2020-03-03 at 11:13:25 +0530, Ramalingam C wrote: > > On 2020-03-03 at 10:54:07 +0530, Anshuman Gupta wrote: > > > DP shim's config_stream_type considered to be succeeded when > > > return value of intel_dp_hdcp2_write_msg() equals to size

[Intel-gfx] ✓ Fi.CI.BAT: success for HDCP 2.2 Comp fixes (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: HDCP 2.2 Comp fixes (rev2) URL : https://patchwork.freedesktop.org/series/73708/ State : success == Summary == CI Bug Log - changes from CI_DRM_8050 -> Patchwork_16791 Summary --- **SUCCESS** No regres

[Intel-gfx] ✗ Fi.CI.DOCS: warning for HDCP 2.2 Comp fixes (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: HDCP 2.2 Comp fixes (rev2) URL : https://patchwork.freedesktop.org/series/73708/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr.c Error: Cannot open file ./drivers/gpu/drm/i915/int

Re: [Intel-gfx] [PATCH v4 2/2] drm/i915/hdcp: Fix config_stream_type() ret value

2020-03-02 Thread Anshuman Gupta
On 2020-03-03 at 11:13:25 +0530, Ramalingam C wrote: > On 2020-03-03 at 10:54:07 +0530, Anshuman Gupta wrote: > > DP shim's config_stream_type considered to be succeeded when > > return value of intel_dp_hdcp2_write_msg() equals to size of > > message to be written, it makes config_stream_type to r

Re: [Intel-gfx] [PATCH v4 2/2] drm/i915/hdcp: Fix config_stream_type() ret value

2020-03-02 Thread Ramalingam C
On 2020-03-03 at 10:54:07 +0530, Anshuman Gupta wrote: > DP shim's config_stream_type considered to be succeeded when > return value of intel_dp_hdcp2_write_msg() equals to size of > message to be written, it makes config_stream_type to return > a zero success value in order to succeed the HDCP aut

[Intel-gfx] [PATCH v4 2/2] drm/i915/hdcp: Fix config_stream_type() ret value

2020-03-02 Thread Anshuman Gupta
DP shim's config_stream_type considered to be succeeded when return value of intel_dp_hdcp2_write_msg() equals to size of message to be written, it makes config_stream_type to return a zero success value in order to succeed the HDCP auth. v2: - config_stream_type() returns 0 on success. [Ram] CC:

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: fix documentation build after rename

2020-03-02 Thread Patchwork
== Series Details == Series: drm/i915: fix documentation build after rename URL : https://patchwork.freedesktop.org/series/74151/ State : success == Summary == CI Bug Log - changes from CI_DRM_8045_full -> Patchwork_16783_full Summary -

[Intel-gfx] ✓ Fi.CI.IGT: success for drm: drm_fb_helper cleanup. (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: drm: drm_fb_helper cleanup. (rev2) URL : https://patchwork.freedesktop.org/series/74140/ State : success == Summary == CI Bug Log - changes from CI_DRM_8045_full -> Patchwork_16782_full Summary --- **SUCC

Re: [Intel-gfx] [PATCH v2 0/7] drm: drm_fb_helper cleanup.

2020-03-02 Thread Laxminarayan Bharadiya, Pankaj
> -Original Message- > From: Emil Velikov > Sent: 02 March 2020 23:51 > To: Laxminarayan Bharadiya, Pankaj > > Cc: Jani Nikula ; Daniel Vetter > ; Intel Graphics Development g...@lists.freedesktop.org>; ML dri-devel > Subject: Re: [Intel-gfx] [PATCH v2 0/7] drm: drm_fb_helper cleanup

Re: [Intel-gfx] [PATCH v2 0/7] drm: drm_fb_helper cleanup.

2020-03-02 Thread Laxminarayan Bharadiya, Pankaj
> -Original Message- > From: Daniel Vetter > Sent: 03 March 2020 03:15 > To: Emil Velikov > Cc: Laxminarayan Bharadiya, Pankaj > ; Jani Nikula > ; Daniel Vetter ; Intel > Graphics Development ; ML dri-devel de...@lists.freedesktop.org> > Subject: Re: [Intel-gfx] [PATCH v2 0/7] drm: drm

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/dp: Add function to parse EDID descriptors for adaptive sync limits (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: drm/dp: Add function to parse EDID descriptors for adaptive sync limits (rev2) URL : https://patchwork.freedesktop.org/series/68488/ State : success == Summary == CI Bug Log - changes from CI_DRM_8050 -> Patchwork_16790

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Fix doclinks

2020-03-02 Thread Patchwork
== Series Details == Series: drm/i915: Fix doclinks URL : https://patchwork.freedesktop.org/series/74146/ State : failure == Summary == CI Bug Log - changes from CI_DRM_8043_full -> Patchwork_16781_full Summary --- **FAILURE** Ser

[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/dp: Add function to parse EDID descriptors for adaptive sync limits (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: drm/dp: Add function to parse EDID descriptors for adaptive sync limits (rev2) URL : https://patchwork.freedesktop.org/series/68488/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr

Re: [Intel-gfx] [PATCH 5/6] drm/i915/uc: Move uC debugfs to its own folder under GT

2020-03-02 Thread Andi Shyti
Hi Daniele, I'm sorry I missed this patch, On Thu, Feb 27, 2020 at 06:28:42PM -0800, Daniele Ceraolo Spurio wrote: > uC is a component of the GT, so it makes sense for the uC debugfs files > to be in the GT folder. A subfolder has been used to keep the same > structure we have for the code. Can

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/6] drm/i915: Nuke pointless div by 64bit

2020-03-02 Thread Patchwork
== Series Details == Series: series starting with [1/6] drm/i915: Nuke pointless div by 64bit URL : https://patchwork.freedesktop.org/series/74145/ State : success == Summary == CI Bug Log - changes from CI_DRM_8043_full -> Patchwork_16780_full =

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/dp, i915: eDP DPCD backlight control detection fixes (rev3)

2020-03-02 Thread Patchwork
== Series Details == Series: drm/dp, i915: eDP DPCD backlight control detection fixes (rev3) URL : https://patchwork.freedesktop.org/series/72991/ State : success == Summary == CI Bug Log - changes from CI_DRM_8049 -> Patchwork_16789 Summar

Re: [Intel-gfx] [CI 1/2] drm/i915/huc: update TGL HuC to v7.0.12

2020-03-02 Thread Daniele Ceraolo Spurio
On 3/2/20 4:25 PM, Ye, Tony wrote: On 2/29/2020 9:20 AM, Daniele Ceraolo Spurio wrote: Update to the latest available TGL HuC, which includes changes required by the media team. Signed-off-by: Daniele Ceraolo Spurio Cc: Tony Ye Cc: Michal Wajdeczko Cc: Anusha Srivatsa Reviewed-by: José R

[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/dp, i915: eDP DPCD backlight control detection fixes (rev3)

2020-03-02 Thread Patchwork
== Series Details == Series: drm/dp, i915: eDP DPCD backlight control detection fixes (rev3) URL : https://patchwork.freedesktop.org/series/72991/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr.c Error: Cannot

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/gen11: Moving WAs to rcs_engine_wa_init()

2020-03-02 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915/gen11: Moving WAs to rcs_engine_wa_init() URL : https://patchwork.freedesktop.org/series/74174/ State : success == Summary == CI Bug Log - changes from CI_DRM_8049 -> Patchwork_16788 =

Re: [Intel-gfx] [CI 1/2] drm/i915/huc: update TGL HuC to v7.0.12

2020-03-02 Thread Ye, Tony
On 2/29/2020 9:20 AM, Daniele Ceraolo Spurio wrote: Update to the latest available TGL HuC, which includes changes required by the media team. Signed-off-by: Daniele Ceraolo Spurio Cc: Tony Ye Cc: Michal Wajdeczko Cc: Anusha Srivatsa Reviewed-by: José Roberto de Souza --- drivers/gpu/drm

[Intel-gfx] ✗ Fi.CI.DOCS: warning for series starting with [1/2] drm/i915/gen11: Moving WAs to rcs_engine_wa_init()

2020-03-02 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915/gen11: Moving WAs to rcs_engine_wa_init() URL : https://patchwork.freedesktop.org/series/74174/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr.

[Intel-gfx] [PATCH v3] drm/dp: Add function to parse EDID descriptors for adaptive sync limits

2020-03-02 Thread Manasi Navare
Adaptive Sync is a VESA feature so add a DRM core helper to parse the EDID's detailed descritors to obtain the adaptive sync monitor range. Store this info as part fo drm_display_info so it can be used across all drivers. This part of the code is stripped out of amdgpu's function amdgpu_dm_update_f

[Intel-gfx] ✓ Fi.CI.BAT: success for drm_device managed resources (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: drm_device managed resources (rev2) URL : https://patchwork.freedesktop.org/series/73633/ State : success == Summary == CI Bug Log - changes from CI_DRM_8049 -> Patchwork_16787 Summary --- **SUCCESS**

[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm_device managed resources (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: drm_device managed resources (rev2) URL : https://patchwork.freedesktop.org/series/73633/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr.c Error: Cannot open file ./drivers/gpu/drm

[Intel-gfx] [PATCH 1/2] drm/i915/gen11: Moving WAs to rcs_engine_wa_init()

2020-03-02 Thread José Roberto de Souza
This are register of render engine, so after a render reset those would return to the default value and init_clock_gating() is not called for single engine reset. So here moving it rcs_engine_wa_init() that will guarantee that this WAs will not be lost. Cc: Matt Roper Signed-off-by: José Roberto

[Intel-gfx] [PATCH 2/2] drm/i915/tgl: Move and restrict Wa_1408615072

2020-03-02 Thread José Roberto de Souza
Following the changes in the previous patch "drm/i915/gen11: Moving WAs to rcs_engine_wa_init()" also moving TGL Wa_1408615072 to rcs_engine_wa_init() this way after a engine reset it will be reapplied also restricting it to B0 as it is fixed in B0 stepping. BSpec: 52890 Cc: Matt Roper Signed-off

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm_device managed resources (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: drm_device managed resources (rev2) URL : https://patchwork.freedesktop.org/series/73633/ 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_device managed resources (rev2)

2020-03-02 Thread Patchwork
== Series Details == Series: drm_device managed resources (rev2) URL : https://patchwork.freedesktop.org/series/73633/ State : warning == Summary == $ dim checkpatch origin/drm-tip 7620b1305ad8 mm/sl[uo]b: export __kmalloc_track(_node)_caller -:58: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-of

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Decrease log level

2020-03-02 Thread Patchwork
== Series Details == Series: drm/i915/display: Decrease log level URL : https://patchwork.freedesktop.org/series/74166/ State : success == Summary == CI Bug Log - changes from CI_DRM_8049 -> Patchwork_16786 Summary --- **SUCCESS**

[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915/display: Decrease log level

2020-03-02 Thread Patchwork
== Series Details == Series: drm/i915/display: Decrease log level URL : https://patchwork.freedesktop.org/series/74166/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr.c Error: Cannot open file ./drivers/gpu/dr

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

2020-03-02 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-03-02 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: Another

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

2020-03-02 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: Another

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

2020-03-02 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: Em

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

2020-03-02 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(); drmm_

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

2020-03-02 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 dr

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

2020-03-02 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 Vetter

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

2020-03-02 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 dr

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

2020-03-02 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 d

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

2020-03-02 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. v2: Use drmm_mode_config_init() for more clarity (Sam, Thomas) Cc: Sam Ravnborg

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

2020-03-02 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: Another

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

2020-03-02 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 final

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

2020-03-02 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 47/51] drm/mipi-dbi: Move drm_mode_config_init into mipi library

2020-03-02 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. Acked-by: Sam Ravnborg Reviewed-by: Noralf Trønnes Tested-by: Noralf Trønnes Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst

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

2020-03-02 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 it

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

2020-03-02 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: Another

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

2020-03-02 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 50/51] drm/udl: drop drm_driver.release hook

2020-03-02 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 should

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

2020-03-02 Thread Daniel Vetter
Only drops the drm_dev_put, but hey a few lines! Reviewed-by: Hans de Goede 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/gm1

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

2020-03-02 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: Another

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

2020-03-02 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. Reviewed-by: Hans de Goede Signed-off-by: Daniel Vette

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

2020-03-02 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 29/51] drm/cirrus: Drop explicit drm_mode_config_cleanup call

2020-03-02 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 _init().

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

2020-03-02 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. Hen

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

2020-03-02 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. Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Daniel Vetter Cc: Emil Velikov Cc: C

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

2020-03-02 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 exp

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

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

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

2020-03-02 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. Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc

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

2020-03-02 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 hardw

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

2020-03-02 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Reviewed-by: Paul Cercueil 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 b

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

2020-03-02 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 10/51] drm/v3d: Use drmm_add_final_kfree

2020-03-02 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 shou

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

2020-03-02 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 drm

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

2020-03-02 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). Acked-by: Sam Ravnborg Signed-off-b

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

2020-03-02 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 b/drivers/gp

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

2020-03-02 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 now also possible that (at least for simple drivers) automatic resource cleanup can be done correctly wit

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

2020-03-02 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 | 7 --

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

2020-03-02 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 12/51] drm/mcde: Use drmm_add_final_kfree

2020-03-02 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Reviewed-by: Linus Walleij Signed-off-by: Daniel Vetter Cc: Linus Walleij --- drivers/gpu/drm/mcde/mcde_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm

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

2020-03-02 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Acked-by: Jyri Sarha 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 17/51] drm/gm12u320: Use drmm_add_final_kfree

2020-03-02 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Reviewed-by: Hans de Goede 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

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

2020-03-02 Thread Daniel Vetter
These are the leftover drivers that didn't have a ->release hook that needed to be updated. Acked-by: Liviu Dudau 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

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

2020-03-02 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 23/51] drm: Manage drm_gem_init with drmm_

2020-03-02 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 14/51] drm/vkms: Use drmm_add_final_kfree

2020-03-02 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. Reviewed-by: Rodrigo Siqueira Tested-by: Rodrigo Siqueira Signed-off-by: Daniel Vetter Cc: Ro

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

2020-03-02 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

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

2020-03-02 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 f

[Intel-gfx] [PATCH 03/51] drm: add managed resources tied to drm_device

2020-03-02 Thread Daniel Vetter
We have lots of these. And the cleanup code tends to be of dubious quality. The biggest wrong pattern is that developers use devm_, which ties the release action to the underlying struct device, whereas all the userspace visible stuff attached to a drm_device can long outlive that one (e.g. after a

[Intel-gfx] [PATCH 04/51] drm: Set final_kfree in drm_dev_alloc

2020-03-02 Thread Daniel Vetter
I also did a full review of all callers, and only the xen driver forgot to call drm_dev_put in the failure path. Fix that up too. v2: I noticed that xen has a drm_driver.release hook, and uses drm_dev_alloc(). We need to remove the kfree from xen_drm_drv_release(). bochs also has a release hook,

[Intel-gfx] [PATCH 00/51] drm_device managed resources, v4

2020-03-02 Thread Daniel Vetter
Hi all, Another round, another attempt at fixing the intel-gfx-ci issues in the selftests. Plus a pile of polish all over, and a bunch more acks/reviews added. We're still missing quite a bit of review, so feedback very much welcome. Thanks, Daniel Daniel Vetter (51): mm/sl[uo]b: export __kma

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [CI,1/2] drm/i915/huc: update TGL HuC to v7.0.12

2020-03-02 Thread Daniele Ceraolo Spurio
On 3/1/20 4:52 PM, Patchwork wrote: == Series Details == Series: series starting with [CI,1/2] drm/i915/huc: update TGL HuC to v7.0.12 URL : https://patchwork.freedesktop.org/series/74099/ State : failure == Summary == CI Bug Log - changes from CI_DRM_8035_full -> Patchwork_16771_full ===

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

2020-03-02 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 Enbe

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

2020-03-02 Thread Daniel Vetter
For two reasons: - The driver core clears this already for us after we're unloaded in __device_release_driver(). - It's way too late, the drm_device ->release callback might massively outlive the underlying physical device, since a drm_device can't be kept alive by open drm_file or well rea

Re: [Intel-gfx] [PATCH v4 02/22] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs

2020-03-02 Thread Daniel Vetter
On Thu, Jan 23, 2020 at 2:59 PM Thomas Zimmermann wrote: > > The new callback get_scanout_position() reads the current location > of the scanout process. The operation is currently located in struct > drm_driver, but really belongs to the CRTC. Drivers will be converted > in separate patches. > >

[Intel-gfx] [PATCH] drm/i915/display: Decrease log level

2020-03-02 Thread Swati Sharma
Converting error to debug print if sink fails to configure scrambling or TMDS bit clock ratio. In this case, we are timing out while disabling the scrambling and setting the SCDC ratio, as there is no response to the I2C SCDC write from the sink device. Error isn't due to something wrong done from

Re: [Intel-gfx] [PATCH v2 0/7] drm: drm_fb_helper cleanup.

2020-03-02 Thread Daniel Vetter
On Mon, Mar 02, 2020 at 10:43:19PM +0100, Daniel Vetter wrote: > On Mon, Mar 02, 2020 at 06:21:23PM +, Emil Velikov wrote: > > Hi Pankaj, > > > > On Mon, 2 Mar 2020 at 16:33, Pankaj Bharadiya > > wrote: > > > > > > This series addresses below drm_fb_helper tasks from > > > Documentation/gpu/t

Re: [Intel-gfx] [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions

2020-03-02 Thread Alex Deucher
On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya wrote: > > drm_fb_helper_single_add_all_connectors(), drm_fb_helper_add_one_connector() > and drm_fb_helper_remove_one_connector() doesn't keep an array of > connectors anymore and are just dummy. Now we have no callers to these > functions hence rem

Re: [Intel-gfx] [PATCH 01/22] drm/i915/gem: Consolidate ctx->engines[] release

2020-03-02 Thread Chris Wilson
Quoting Mika Kuoppala (2020-03-02 18:29:09) > Chris Wilson writes: > > @@ -491,30 +491,104 @@ static void kill_engines(struct i915_gem_engines > > *engines) > > static void kill_stale_engines(struct i915_gem_context *ctx) > > { > > struct i915_gem_engines *pos, *next; > > - unsigned l

Re: [Intel-gfx] [PATCH v2 0/7] drm: drm_fb_helper cleanup.

2020-03-02 Thread Daniel Vetter
On Mon, Mar 02, 2020 at 06:21:23PM +, Emil Velikov wrote: > Hi Pankaj, > > On Mon, 2 Mar 2020 at 16:33, Pankaj Bharadiya > wrote: > > > > This series addresses below drm_fb_helper tasks from > > Documentation/gpu/todo.rst. > > > > - The max connector argument for drm_fb_helper_init() isn't us

Re: [Intel-gfx] [PATCH 5/9] drm: Remove drm_fb_helper add, add all and remove connector calls

2020-03-02 Thread Alex Deucher
On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya wrote: > > drm_fb_helper_{add,remove}_one_connector() and > drm_fb_helper_single_add_all_connectors() are dummy functions now > and serve no purpose. Hence remove their calls. > > This is the preparatory step for removing the > drm_fb_helper_{add,rem

Re: [Intel-gfx] [PATCH 4/9] drm/i915/display: Remove drm_fb_helper_{add, remove}_one_connector calls

2020-03-02 Thread Alex Deucher
On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya wrote: > > drm_fb_helper_{add,remove}_one_connector() are dummy functions now > and serve no purpose. Hence remove their calls. > > This is the preparatory step for removing the > drm_fb_helper_{add,remove}_one_connector() functions from > drm_fb_hel

  1   2   3   >