Re: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

Maarten Lankhorst
2018-11-12T17:33:43Z

Op 12-11-18 om 17:11 schreef Sean Paul:
> On Mon, Nov 12, 2018 at 04:01:14PM +0100, Maarten Lankhorst wrote:
>> We already have __drm_atomic_helper_connector_reset() and
>> __drm_atomic_helper_plane_reset(), extend this to crtc as well.
>>
>> Most drivers already have a gpu reset hook, correct it.
>> Nouveau already implemented its own __drm_atomic_helper_crtc_reset(),
>> convert it to the common one.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Harry Wentland <harry.wentland@amd.com>
>> Cc: Leo Li <sunpeng.li@amd.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: "Christian KÃ¶nig" <christian.koenig@amd.com>
>> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: Liviu Dudau <liviu.dudau@arm.com>
>> Cc: Brian Starkey <brian.starkey@arm.com>
>> Cc: Mali DP Maintainers <malidp@foss.arm.com>
>> Cc: Boris Brezillon <boris.brezillon@bootlin.com>
>> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
>> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
>> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
>> Cc: Sean Paul <sean@poorly.run>
>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Philipp Zabel <p.zabel@pengutronix.de>
>> Cc: CK Hu <ck.hu@mediatek.com>
>> Cc: Matthias Brugger <matthias.bgg@gmail.com>
>> Cc: Rob Clark <robdclark@gmail.com>
>> Cc: Ben Skeggs <bskeggs@redhat.com>
>> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
>> Cc: Sandy Huang <hjc@rock-chips.com>
>> Cc: "Heiko StÃ¼bner" <heiko@sntech.de>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
>> Cc: Jonathan Hunter <jonathanh@nvidia.com>
>> Cc: Eric Anholt <eric@anholt.net>
>> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
>> Cc: Sinclair Yeh <syeh@vmware.com>
>> Cc: Thomas Hellstrom <thellstrom@vmware.com>
>> Cc: Tony Cheng <Tony.Cheng@amd.com>
>> Cc: Shirish S <shirish.s@amd.com>
>> Cc: Mikita Lipski <mikita.lipski@amd.com>
>> Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
>> Cc: David Francis <David.Francis@amd.com>
>> Cc: Anthony Koo <Anthony.Koo@amd.com>
>> Cc: Jeykumar Sankaran <jsanka@codeaurora.org>
>> Cc: Jordan Crouse <jcrouse@codeaurora.org>
>> Cc: Bruce Wang <bzwang@chromium.org>
>> Cc: Sravanthi Kollukuduru <skolluku@codeaurora.org>
>> Cc: Archit Taneja <architt@codeaurora.org>
>> Cc: Steve Kowalik <steven@wedontsleep.org>
>> Cc: Carsten Behling <carsten.behling@googlemail.com>
>> Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
>> Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
>> Cc: amd-gfx@lists.freedesktop.org
>> Cc: dri-devel@lists.freedesktop.org
>> Cc: linux-kernel@vger.kernel.org
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: intel-gfx@lists.freedesktop.org
>> Cc: linux-mediatek@lists.infradead.org
>> Cc: linux-arm-msm@vger.kernel.org
>> Cc: freedreno@lists.freedesktop.org
>> Cc: nouveau@lists.freedesktop.org
>> Cc: linux-renesas-soc@vger.kernel.org
>> Cc: linux-rockchip@lists.infradead.org
>> Cc: linux-tegra@vger.kernel.org
>> ---
>> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +--
>> drivers/gpu/drm/arm/malidp_crtc.c | 5 +--
>> .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 5 +--
>> drivers/gpu/drm/drm_atomic_state_helper.c | 31 ++++++++++++++++---
>> drivers/gpu/drm/i915/intel_display.c | 2 +-
>> drivers/gpu/drm/imx/ipuv3-crtc.c | 5 +--
>> drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 5 +--
>> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 12 ++-----
>> drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 6 +---
>> drivers/gpu/drm/nouveau/dispnv50/head.c | 13 ++------
>> drivers/gpu/drm/omapdrm/omap_crtc.c | 7 ++---
>> drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 4 +--
>> drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 7 +++--
>> drivers/gpu/drm/tegra/dc.c | 5 +--
>> drivers/gpu/drm/vc4/vc4_crtc.c | 8 ++---
>> drivers/gpu/drm/vkms/vkms_crtc.c | 7 +----
>> drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 9 +-----
>> include/drm/drm_atomic_state_helper.h | 2 ++
>> 18 files changed, 56 insertions(+), 81 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index 5064768642f3..770a71726cd1 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -2802,9 +2802,7 @@ static void dm_crtc_reset_state(struct drm_crtc *crtc)
>> if (WARN_ON(!state))
> Can you give this the same treatment as the other allocation checks?

Yeah sure, the reason I didn't was because all of the amdgpu  reset functions worked like that. I'll send a preparation patch to fix that up.

~Maarten

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org