From: Heiko Stuebner <heiko@sntech.de>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
amd-gfx@lists.freedesktop.org,
Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>,
linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org,
linux-rockchip@lists.infradead.org,
Mali DP Maintainers <malidp@foss.arm.com>,
nouveau@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-mediatek@lists.infradead.org,
freedreno@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere
Date: Mon, 12 Nov 2018 16:36:41 +0100 [thread overview]
Message-ID: <2475529.N6HtQ5V54z@phil> (raw)
In-Reply-To: <20181112150114.18395-2-maarten.lankhorst@linux.intel.com>
Am Montag, 12. November 2018, 16:01:14 CET schrieb Maarten Lankhorst:
> 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>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index fb70fb486fbf..d2d5aa676084 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1071,13 +1071,14 @@ static void vop_crtc_destroy(struct drm_crtc *crtc)
>
> static void vop_crtc_reset(struct drm_crtc *crtc)
> {
> + struct rockchip_crtc_state *crtc_state =
> + kzalloc(sizeof(*crtc_state), GFP_KERNEL);
> +
> if (crtc->state)
> __drm_atomic_helper_crtc_destroy_state(crtc->state);
> kfree(crtc->state);
>
> - crtc->state = kzalloc(sizeof(struct rockchip_crtc_state), GFP_KERNEL);
> - if (crtc->state)
> - crtc->state->crtc = crtc;
> + __drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
> }
>
> static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
for the Rockchip-part
Acked-by: Heiko Stuebner <heiko@sntech.de>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
amd-gfx@lists.freedesktop.org,
Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
David Airlie <airlied@linux.ie>,
Mali DP Maintainers <malidp@foss.arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
nouveau@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org,
linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere
Date: Mon, 12 Nov 2018 16:36:41 +0100 [thread overview]
Message-ID: <2475529.N6HtQ5V54z@phil> (raw)
In-Reply-To: <20181112150114.18395-2-maarten.lankhorst@linux.intel.com>
Am Montag, 12. November 2018, 16:01:14 CET schrieb Maarten Lankhorst:
> 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>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index fb70fb486fbf..d2d5aa676084 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1071,13 +1071,14 @@ static void vop_crtc_destroy(struct drm_crtc *crtc)
>
> static void vop_crtc_reset(struct drm_crtc *crtc)
> {
> + struct rockchip_crtc_state *crtc_state =
> + kzalloc(sizeof(*crtc_state), GFP_KERNEL);
> +
> if (crtc->state)
> __drm_atomic_helper_crtc_destroy_state(crtc->state);
> kfree(crtc->state);
>
> - crtc->state = kzalloc(sizeof(struct rockchip_crtc_state), GFP_KERNEL);
> - if (crtc->state)
> - crtc->state->crtc = crtc;
> + __drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
> }
>
> static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
for the Rockchip-part
Acked-by: Heiko Stuebner <heiko@sntech.de>
WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stuebner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere
Date: Mon, 12 Nov 2018 16:36:41 +0100 [thread overview]
Message-ID: <2475529.N6HtQ5V54z@phil> (raw)
In-Reply-To: <20181112150114.18395-2-maarten.lankhorst@linux.intel.com>
Am Montag, 12. November 2018, 16:01:14 CET schrieb Maarten Lankhorst:
> 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>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index fb70fb486fbf..d2d5aa676084 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1071,13 +1071,14 @@ static void vop_crtc_destroy(struct drm_crtc *crtc)
>
> static void vop_crtc_reset(struct drm_crtc *crtc)
> {
> + struct rockchip_crtc_state *crtc_state =
> + kzalloc(sizeof(*crtc_state), GFP_KERNEL);
> +
> if (crtc->state)
> __drm_atomic_helper_crtc_destroy_state(crtc->state);
> kfree(crtc->state);
>
> - crtc->state = kzalloc(sizeof(struct rockchip_crtc_state), GFP_KERNEL);
> - if (crtc->state)
> - crtc->state->crtc = crtc;
> + __drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
> }
>
> static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
for the Rockchip-part
Acked-by: Heiko Stuebner <heiko@sntech.de>
next prev parent reply other threads:[~2018-11-12 15:36 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 15:01 [PATCH 1/2] drm/vc4: Fix memory leak during gpu reset Maarten Lankhorst
2018-11-12 15:01 ` Maarten Lankhorst
2018-11-12 15:01 ` [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere Maarten Lankhorst
[not found] ` <20181112150114.18395-2-maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-11-12 15:11 ` Boris Brezillon
2018-11-12 15:23 ` Li, Sun peng (Leo)
2018-11-12 15:23 ` Li, Sun peng (Leo)
2018-11-12 15:23 ` Li, Sun peng (Leo)
2018-11-12 15:36 ` Thierry Reding
2018-11-12 16:02 ` Wentland, Harry
2018-11-12 16:11 ` Sean Paul
2018-11-12 17:33 ` Maarten Lankhorst
2018-11-12 20:01 ` Liviu Dudau
2018-11-12 20:01 ` Liviu Dudau
2018-11-12 20:01 ` Liviu Dudau
2018-11-18 13:31 ` Rodrigo Siqueira
2018-11-21 18:41 ` Lyude Paul
2018-11-12 15:36 ` Heiko Stuebner [this message]
2018-11-12 15:36 ` Heiko Stuebner
2018-11-12 15:36 ` Heiko Stuebner
2018-11-12 18:21 ` [Intel-gfx] " Ville Syrjälä
2018-11-20 7:08 ` CK Hu
2018-11-20 7:08 ` CK Hu
2018-11-20 9:30 ` Philipp Zabel
2018-11-21 21:06 ` Kieran Bingham
2018-11-12 15:40 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/vc4: Fix memory leak during gpu reset Patchwork
2018-11-12 15:41 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-12 15:56 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-12 17:26 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2475529.N6HtQ5V54z@phil \
--to=heiko@sntech.de \
--cc=airlied@linux.ie \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=malidp@foss.arm.com \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.