[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190424170910.GC21067@ravnborg.org>
Date: Wed, 24 Apr 2019 19:09:10 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: John Stultz <john.stultz@...aro.org>
Cc: lkml <linux-kernel@...r.kernel.org>,
Xu YiPing <xuyiping@...ilicon.com>,
David Airlie <airlied@...ux.ie>,
Chen Feng <puck.chen@...ilicon.com>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Xinliang Liu <z.liuxinliang@...ilicon.com>,
Xinwei Kong <kong.kongxinwei@...ilicon.com>,
Rongrong Zou <zourongrong@...il.com>
Subject: Re: [PATCH 24/25] drm: kirin: Pass driver data to crtc init and
plane init
Hi John.
On Tue, Apr 23, 2019 at 04:20:55PM -0700, John Stultz wrote:
> From: Xu YiPing <xuyiping@...ilicon.com>
>
> As part of refactoring the kirin driver to better support
> different hardware revisions, this patch changes funcitons
> to pass the kirin_driver_data as a prameter.
>
> This will allow those funcitons to be later moved to the
> generic kirin_drm_drv.c
>
> Cc: Xinliang Liu <z.liuxinliang@...ilicon.com>
> Cc: Rongrong Zou <zourongrong@...il.com>
> Cc: Xinwei Kong <kong.kongxinwei@...ilicon.com>
> Cc: Chen Feng <puck.chen@...ilicon.com>
> Cc: David Airlie <airlied@...ux.ie>
> Cc: Daniel Vetter <daniel@...ll.ch>
> Cc: dri-devel <dri-devel@...ts.freedesktop.org>
> Signed-off-by: Xu YiPing <xuyiping@...ilicon.com>
> [jstultz: Reworded commit message]
> Signed-off-by: John Stultz <john.stultz@...aro.org>
> ---
> drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 25 ++++++++++++++-----------
> 1 file changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> index 71671f8..876e25b 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> @@ -572,7 +572,8 @@ static const struct drm_crtc_funcs ade_crtc_funcs = {
> };
>
> static int kirin_drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
> - struct drm_plane *plane)
> + struct drm_plane *plane,
> + const struct kirin_drm_data *driver_data)
Indent looks wrong here.
> {
> struct device_node *port;
> int ret;
> @@ -589,13 +590,13 @@ static int kirin_drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
> crtc->port = port;
>
> ret = drm_crtc_init_with_planes(dev, crtc, plane, NULL,
> - ade_driver_data.crtc_funcs, NULL);
> + driver_data->crtc_funcs, NULL);
> if (ret) {
> DRM_ERROR("failed to init crtc.\n");
> return ret;
> }
>
> - drm_crtc_helper_add(crtc, ade_driver_data.crtc_helper_funcs);
> + drm_crtc_helper_add(crtc, driver_data->crtc_helper_funcs);
>
> return 0;
> }
> @@ -894,21 +895,22 @@ static struct drm_plane_funcs ade_plane_funcs = {
>
> static int kirin_drm_plane_init(struct drm_device *dev,
> struct kirin_plane *kplane,
> - enum drm_plane_type type)
> + enum drm_plane_type type,
> + const struct kirin_drm_data *driver_data)
> {
> int ret = 0;
>
> ret = drm_universal_plane_init(dev, &kplane->base, 1,
> + driver_data->plane_funcs,
> + driver_data->channel_formats,
> + driver_data->channel_formats_cnt,
> + NULL, type, NULL);
Indent looks wrong here.
I missed where ade_driver_data came from.
This looks an extra patch to intoduce driver_data,
that maybe should be merged with an earlier version?
Sam
Powered by blists - more mailing lists