Re: [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. > >

Re: [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: [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

Re: [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()

Re: [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

Re: [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 = >dev; > ret = drm_dev_init(dev, _driver, >dev); > - if (ret) > - goto err_free_cirrus; > + if (ret) { > + kfree(cirrus); > + goto err_pci_release; > + }

Re: [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:

Re: [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

Re: [PATCH 15/33] drm/panel-simple: Fix dotclock for EDT ET035012DM6

2020-03-02 Thread Marco Felsch
Hi Ville, On 20-03-02 22:34, Ville Syrjala wrote: > From: Ville Syrjälä > > The currently listed dotclock disagrees with the currently > listed vrefresh rate. Change the dotclock to match the vrefresh. > > Someone tell me which (if either) of the dotclock or vreresh is > correct? Pls, check

[PATCH] drm/vblank: Fix documentation of VBLANK timestamp helper

2020-03-02 Thread Thomas Zimmermann
Per-CRTC VBLANK information used to be addressed by device and pipe index. A call drm_crtc_vblank_helper_get_vblank_timestamp_internal() receives a pointer to the CRTC instead. Fix the documentation. Signed-off-by: Thomas Zimmermann Reported-by: Daniel Vetter Fixes: f1e2b6371c12 ("drm: Add

[PATCH] drm/simple-kms: Fix documentation for drm_simple_encoder_init()

2020-03-02 Thread Thomas Zimmermann
Brings the documentation of drm_simple_encoder_init() in sync with the function's signature. Signed-off-by: Thomas Zimmermann Fixes: 63170ac6f2e8 ("drm/simple-kms: Add drm_simple_encoder_{init,create}()") Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel

Re: [PATCH] drm/bochs: Remove vga write

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 02:14:02PM -0800, Alistair Francis wrote: > On Fri, Feb 28, 2020 at 1:57 AM Gerd Hoffmann wrote: > > > > On Thu, Feb 27, 2020 at 01:04:54PM -0800, Alistair Francis wrote: > > > The QEMU model for the Bochs display has no VGA memory section at offset > > > 0x400 [1]. By

Re: [PATCH 3/3] bus: ti-sysc: Implement display subsystem reset quirk

2020-03-02 Thread Tomi Valkeinen
On 24/02/2020 21:12, Tony Lindgren wrote: The display subsystem (DSS) needs the child outputs disabled for reset. In order to prepare to probe DSS without legacy platform data, let's implement sysc_pre_reset_quirk_dss() similar to what we have for the platform data with omap_dss_reset(). Note

Re: [PATCH 06/33] drm/panel-lg-lg4573: Fix dotclock

2020-03-02 Thread Heiko Schocher
Hello Ville Syrjala, Am 02.03.2020 um 21:34 schrieb Ville Syrjala: From: Ville Syrjälä The currently listed dotclock disagrees with the currently listed vrefresh rate. Change the dotclock to match the vrefresh. Someone tell me which (if either) of the dotclock or vreresh is correct? Your

[PATCH v12 0/6] mt8183 dpi supports dual edge and pin mode swap

2020-03-02 Thread Jitao Shi
Change since v11: - fine tune mediatek,dpi.yaml. - add Acked-by: Rob Herring . Change since v10: - convert the Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt to yaml format. - read the pclk-sample in endpoint. Changes since v9: - rename pinctrl-names = "gpiomode",

[PATCH v12 3/6] dt-bindings: display: mediatek: dpi sample data in dual edge support

2020-03-02 Thread Jitao Shi
Add property "pclk-sample" to config the dpi sample on falling (0), rising (1), both falling and rising (2). Acked-by: Rob Herring Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dpi.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v12 2/6] dt-bindings: display: mediatek: control dpi pins mode to avoid leakage

2020-03-02 Thread Jitao Shi
Add property "pinctrl-names" to swap pin mode between gpio and dpi mode. Set the dpi pins to gpio mode and output-low to avoid leakage current when dpi disabled. Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dpi.txt | 7 +++ 1 file changed, 7 insertions(+)

[PATCH v12 5/6] drm/mediatek: dpi sample mode support

2020-03-02 Thread Jitao Shi
DPI can sample on falling, rising or both edge. When DPI sample the data both rising and falling edge. It can reduce half data io pins. Reviewed-by: CK Hu Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-)

[PATCH v12 4/6] dt-bindings: display: mediatek: convert the document format from txt to yaml

2020-03-02 Thread Jitao Shi
Signed-off-by: Jitao Shi --- .../display/mediatek/mediatek,dpi.txt | 45 - .../display/mediatek/mediatek,dpi.yaml| 92 +++ 2 files changed, 92 insertions(+), 45 deletions(-) delete mode 100644

[PATCH v12 1/6] dt-bindings: media: add pclk-sample dual edge property

2020-03-02 Thread Jitao Shi
Some chips's sample mode are rising, falling and dual edge (both falling and rising edge). Extern the pclk-sample property to support dual edge. Acked-by: Rob Herring Reviewed-by: CK Hu Signed-off-by: Jitao Shi --- Documentation/devicetree/bindings/media/video-interfaces.txt | 4 ++-- 1 file

[PATCH v12 6/6] drm/mediatek: set dpi pin mode to gpio low to avoid leakage current

2020-03-02 Thread Jitao Shi
Config dpi pins mode to output and pull low when dpi is disabled. Aovid leakage current from some dpi pins (Hsync Vsync DE ... ). Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 44 -- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git

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

Re: [PATCH] drm/edid: Distribute switch variables for initialization

2020-03-02 Thread Kees Cook
On Wed, Feb 19, 2020 at 10:22:29PM -0800, Kees Cook wrote: > Variables declared in a switch statement before any case statements > cannot be automatically initialized with compiler instrumentation (as > they are not part of any execution flow). With GCC's proposed automatic > stack variable

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:

Re: [PATCH v10 3/5] soc: mediatek: Move mt8173 MMSYS to platform driver

2020-03-02 Thread CK Hu
Hi, Matthias: On Thu, 2020-02-27 at 19:22 +0100, Matthias Brugger wrote: > > On 27/02/2020 19:21, Matthias Brugger wrote: > > > > > > On 27/02/2020 19:08, Enric Balletbo i Serra wrote: > >> From: Matthias Brugger > >> > >> There is no strong reason for this to use CLK_OF_DECLARE instead of >

Re: [PATCH v11 4/5] soc / drm: mediatek: Move routing control to mmsys device

2020-03-02 Thread CK Hu
Hi, Enric: On Mon, 2020-03-02 at 12:01 +0100, Enric Balletbo i Serra wrote: > Provide a mtk_mmsys_ddp_connect() and mtk_mmsys_disconnect() functions to > replace mtk_ddp_add_comp_to_path() and mtk_ddp_remove_comp_from_path(). > Those functions will allow DRM driver and others to control the data

[PATCH AUTOSEL 4.4 04/11] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-02 Thread Sasha Levin
From: John Stultz [ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ] I was hitting kCFI crashes when building with clang, and after some digging finally narrowed it down to the dsi_mgr_connector_mode_valid() function being implemented as returning an int, instead of an enum

[PATCH AUTOSEL 4.9 06/13] drm/msm/dsi: save pll state before dsi host is powered off

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit a1028dcfd0dd97884072288d0c8ed7f30399b528 ] Save pll state before dsi host is powered off. Without this change some register values gets resetted. Signed-off-by: Harigovindan P Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.4 05/11] drm/msm/dsi: save pll state before dsi host is powered off

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit a1028dcfd0dd97884072288d0c8ed7f30399b528 ] Save pll state before dsi host is powered off. Without this change some register values gets resetted. Signed-off-by: Harigovindan P Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.9 05/13] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-02 Thread Sasha Levin
From: John Stultz [ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ] I was hitting kCFI crashes when building with clang, and after some digging finally narrowed it down to the dsi_mgr_connector_mode_valid() function being implemented as returning an int, instead of an enum

[PATCH AUTOSEL 4.19 08/32] drm/msm/mdp5: rate limit pp done timeout warnings

2020-03-02 Thread Sasha Levin
From: Brian Masney [ Upstream commit ef8c9809acb0805c991bba8bdd4749fc46d44a98 ] Add rate limiting of the 'pp done time out' warnings since these warnings can quickly fill the dmesg buffer. Signed-off-by: Brian Masney Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.14 07/22] drm/msm/mdp5: rate limit pp done timeout warnings

2020-03-02 Thread Sasha Levin
From: Brian Masney [ Upstream commit ef8c9809acb0805c991bba8bdd4749fc46d44a98 ] Add rate limiting of the 'pp done time out' warnings since these warnings can quickly fill the dmesg buffer. Signed-off-by: Brian Masney Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.14 08/22] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-02 Thread Sasha Levin
From: John Stultz [ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ] I was hitting kCFI crashes when building with clang, and after some digging finally narrowed it down to the dsi_mgr_connector_mode_valid() function being implemented as returning an int, instead of an enum

[PATCH AUTOSEL 4.14 09/22] drm/msm/dsi: save pll state before dsi host is powered off

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit a1028dcfd0dd97884072288d0c8ed7f30399b528 ] Save pll state before dsi host is powered off. Without this change some register values gets resetted. Signed-off-by: Harigovindan P Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.19 09/32] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-02 Thread Sasha Levin
From: John Stultz [ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ] I was hitting kCFI crashes when building with clang, and after some digging finally narrowed it down to the dsi_mgr_connector_mode_valid() function being implemented as returning an int, instead of an enum

[PATCH AUTOSEL 4.19 11/32] drm/msm/dsi: save pll state before dsi host is powered off

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit a1028dcfd0dd97884072288d0c8ed7f30399b528 ] Save pll state before dsi host is powered off. Without this change some register values gets resetted. Signed-off-by: Harigovindan P Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.19 12/32] drm/msm/dsi/pll: call vco set rate explicitly

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit c6659785dfb3f8d75f1fe637e4222ff8178f5280 ] For a given byte clock, if VCO recalc value is exactly same as vco set rate value, vco_set_rate does not get called assuming VCO is already set to required value. But Due to GDSC toggle, VCO values are erased in

[PATCH AUTOSEL 5.4 13/58] drm/modes: Make sure to parse valid rotation value from cmdline

2020-03-02 Thread Sasha Levin
From: Stephan Gerhold [ Upstream commit e6980a727154b793adb218fbc7b4d6af52a7e364 ] A rotation value should have exactly one rotation angle. At the moment there is no validation for this when parsing video= parameters from the command line. This causes problems later on when we try to combine

[PATCH AUTOSEL 5.4 14/58] drm/modes: Allow DRM_MODE_ROTATE_0 when applying video mode parameters

2020-03-02 Thread Sasha Levin
From: Stephan Gerhold [ Upstream commit 5c320b6ce7510653bce68cecf80cf5b2d67e907f ] At the moment, only DRM_MODE_ROTATE_180 is allowed when we try to apply the rotation from the video mode parameters. It is also useful to allow DRM_MODE_ROTATE_0 in case there is only a reflect option in the

[PATCH AUTOSEL 5.4 17/58] drm/msm/dsi/pll: call vco set rate explicitly

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit c6659785dfb3f8d75f1fe637e4222ff8178f5280 ] For a given byte clock, if VCO recalc value is exactly same as vco set rate value, vco_set_rate does not get called assuming VCO is already set to required value. But Due to GDSC toggle, VCO values are erased in

[PATCH AUTOSEL 5.4 16/58] drm/msm/dsi: save pll state before dsi host is powered off

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit a1028dcfd0dd97884072288d0c8ed7f30399b528 ] Save pll state before dsi host is powered off. Without this change some register values gets resetted. Signed-off-by: Harigovindan P Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.4 12/58] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-02 Thread Sasha Levin
From: John Stultz [ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ] I was hitting kCFI crashes when building with clang, and after some digging finally narrowed it down to the dsi_mgr_connector_mode_valid() function being implemented as returning an int, instead of an enum

[PATCH AUTOSEL 5.4 11/58] drm/msm/mdp5: rate limit pp done timeout warnings

2020-03-02 Thread Sasha Levin
From: Brian Masney [ Upstream commit ef8c9809acb0805c991bba8bdd4749fc46d44a98 ] Add rate limiting of the 'pp done time out' warnings since these warnings can quickly fill the dmesg buffer. Signed-off-by: Brian Masney Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.5 17/66] drm/msm/dsi: save pll state before dsi host is powered off

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit a1028dcfd0dd97884072288d0c8ed7f30399b528 ] Save pll state before dsi host is powered off. Without this change some register values gets resetted. Signed-off-by: Harigovindan P Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.5 15/66] drm/modes: Allow DRM_MODE_ROTATE_0 when applying video mode parameters

2020-03-02 Thread Sasha Levin
From: Stephan Gerhold [ Upstream commit 5c320b6ce7510653bce68cecf80cf5b2d67e907f ] At the moment, only DRM_MODE_ROTATE_180 is allowed when we try to apply the rotation from the video mode parameters. It is also useful to allow DRM_MODE_ROTATE_0 in case there is only a reflect option in the

[PATCH AUTOSEL 5.5 18/66] drm/msm/dsi/pll: call vco set rate explicitly

2020-03-02 Thread Sasha Levin
From: Harigovindan P [ Upstream commit c6659785dfb3f8d75f1fe637e4222ff8178f5280 ] For a given byte clock, if VCO recalc value is exactly same as vco set rate value, vco_set_rate does not get called assuming VCO is already set to required value. But Due to GDSC toggle, VCO values are erased in

[PATCH AUTOSEL 5.5 12/66] drm/msm/mdp5: rate limit pp done timeout warnings

2020-03-02 Thread Sasha Levin
From: Brian Masney [ Upstream commit ef8c9809acb0805c991bba8bdd4749fc46d44a98 ] Add rate limiting of the 'pp done time out' warnings since these warnings can quickly fill the dmesg buffer. Signed-off-by: Brian Masney Signed-off-by: Rob Clark Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.5 13/66] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-02 Thread Sasha Levin
From: John Stultz [ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ] I was hitting kCFI crashes when building with clang, and after some digging finally narrowed it down to the dsi_mgr_connector_mode_valid() function being implemented as returning an int, instead of an enum

[PATCH AUTOSEL 5.5 14/66] drm/modes: Make sure to parse valid rotation value from cmdline

2020-03-02 Thread Sasha Levin
From: Stephan Gerhold [ Upstream commit e6980a727154b793adb218fbc7b4d6af52a7e364 ] A rotation value should have exactly one rotation angle. At the moment there is no validation for this when parsing video= parameters from the command line. This causes problems later on when we try to combine

Re: [PATCH v4 1/2] dt-bindings: display: msm: Convert GMU bindings to YAML

2020-03-02 Thread Rob Herring
On Mon, 2 Mar 2020 13:47:46 -0700, Jordan Crouse wrote: > Convert display/msm/gmu.txt to display/msm/gmu.yaml and remove the old > text bindings. > > Signed-off-by: Jordan Crouse > --- > > .../devicetree/bindings/display/msm/gmu.txt| 116 --- >

[PATCH 1/2] drm/virtio: factor out the sg_table from virtio_gpu_object

2020-03-02 Thread Gurchetan Singh
A resource will be a shmem based resource or a (planned) vram based resource, so it makes sense to factor out common fields (resource handle, dumb, mapped). Signed-off-by: Gurchetan Singh --- drivers/gpu/drm/virtio/virtgpu_drv.h| 11 --- drivers/gpu/drm/virtio/virtgpu_object.c | 20

[PATCH 2/2] drm/virtio: make sure virtio_gpu_cleanup_object(..) only happens on shmem objects

2020-03-02 Thread Gurchetan Singh
This function won't be useable for hostmem objects. Signed-off-by: Gurchetan Singh --- drivers/gpu/drm/virtio/virtgpu_drv.h| 2 +- drivers/gpu/drm/virtio/virtgpu_object.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_vq.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git

[PATCH v2] nouveau/hmm: map pages after migration

2020-03-02 Thread Ralph Campbell
When memory is migrated to the GPU, it is likely to be accessed by GPU code soon afterwards. Instead of waiting for a GPU fault, map the migrated memory into the GPU page tables with the same access permissions as the source CPU page table entries. This preserves copy on write semantics.

[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

Re: [PATCH v11 2/5] dt-bindings: mediatek: Update mmsys binding to reflect it is a system controller

2020-03-02 Thread Rob Herring
On Mon, 2 Mar 2020 12:01:25 +0100, Enric Balletbo i Serra wrote: > The mmsys system controller is not only a pure clock controller, so > update the binding documentation to reflect that apart from providing > clocks, it also provides routing and miscellaneous control registers. > >

Re: [PATCH v11 2/6] dt-bindings: display: mediatek: control dpi pins mode to avoid leakage

2020-03-02 Thread Rob Herring
On Mon, Mar 02, 2020 at 05:29:03PM -0600, Rob Herring wrote: > On Fri, 28 Feb 2020 16:14:37 +0800, Jitao Shi wrote: > > Add property "pinctrl-names" to swap pin mode between gpio and dpi mode. Set > > the dpi pins to gpio mode and output-low to avoid leakage current when dpi > > disabled. > > > >

Re: [PATCH v11 4/6] dt-bindings: display: mediatek: convert the document format from txt to yaml

2020-03-02 Thread Rob Herring
On Fri, Feb 28, 2020 at 04:14:39PM +0800, Jitao Shi wrote: > Signed-off-by: Jitao Shi > --- > .../display/mediatek/mediatek,dpi.txt | 45 > .../display/mediatek/mediatek,dpi.yaml| 100 ++ > 2 files changed, 100 insertions(+), 45 deletions(-) > delete

Re: [PATCH v11 3/6] dt-bindings: display: mediatek: dpi sample data in dual edge support

2020-03-02 Thread Rob Herring
On Fri, 28 Feb 2020 16:14:38 +0800, Jitao Shi wrote: > Add property "pclk-sample" to config the dpi sample on falling (0), > rising (1), both falling and rising (2). > > Signed-off-by: Jitao Shi > --- > .../devicetree/bindings/display/mediatek/mediatek,dpi.txt | 4 +++- > 1 file changed, 3

Re: [PATCH v11 2/6] dt-bindings: display: mediatek: control dpi pins mode to avoid leakage

2020-03-02 Thread Rob Herring
On Fri, 28 Feb 2020 16:14:37 +0800, Jitao Shi wrote: > Add property "pinctrl-names" to swap pin mode between gpio and dpi mode. Set > the dpi pins to gpio mode and output-low to avoid leakage current when dpi > disabled. > > Signed-off-by: Jitao Shi > --- >

Re: [Bug 206697] #PF: supervisor read access in kernel mode, #PF: error_code(0x0000) - not-present page while building a large project

2020-03-02 Thread Andrew Morton
(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). On Mon, 02 Mar 2020 21:55:10 + bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=206697 > > --- Comment #2 from Erhard F. (erhar...@mailbox.org) --- >

[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();

[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:

[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:

[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

[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

[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

[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

[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

[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().

[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

[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().

[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:

[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:

[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

[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

[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

[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:

[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

[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

[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

[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().

[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:

[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

[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

[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

[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

[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

[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

[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

[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

[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 +--

[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

[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

[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

[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

[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

[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:

[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.

[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

[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

  1   2   3   >