Commit a51735be authored by Xu YiPing's avatar Xu YiPing Committed by Sam Ravnborg

drm: kirin: Rename plane_init and crtc_init

As part of refactoring the kirin driver to better support
different hardware revisions, this patch renames
ade_crtc/plane_init kirin_plane/crtc_init, as they will later be
moved to kirin drm drv and shared with the kirin960 hardware
support.

Cc: Rongrong Zou <zourongrong@gmail.com>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: default avatarXinliang Liu <z.liuxinliang@hisilicon.com>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarXu YiPing <xuyiping@hisilicon.com>
[jstultz: reworded commit message]
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-21-john.stultz@linaro.org
parent d606dc9a
...@@ -571,7 +571,7 @@ static const struct drm_crtc_funcs ade_crtc_funcs = { ...@@ -571,7 +571,7 @@ static const struct drm_crtc_funcs ade_crtc_funcs = {
.disable_vblank = ade_crtc_disable_vblank, .disable_vblank = ade_crtc_disable_vblank,
}; };
static int ade_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, static int kirin_drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_plane *plane) struct drm_plane *plane)
{ {
struct device_node *port; struct device_node *port;
...@@ -892,7 +892,8 @@ static struct drm_plane_funcs ade_plane_funcs = { ...@@ -892,7 +892,8 @@ static struct drm_plane_funcs ade_plane_funcs = {
.atomic_destroy_state = drm_atomic_helper_plane_destroy_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
}; };
static int ade_plane_init(struct drm_device *dev, struct kirin_plane *kplane, static int kirin_drm_plane_init(struct drm_device *dev,
struct kirin_plane *kplane,
enum drm_plane_type type) enum drm_plane_type type)
{ {
int ret = 0; int ret = 0;
...@@ -989,6 +990,7 @@ static int ade_drm_init(struct platform_device *pdev) ...@@ -989,6 +990,7 @@ static int ade_drm_init(struct platform_device *pdev)
struct kirin_crtc *kcrtc; struct kirin_crtc *kcrtc;
struct kirin_plane *kplane; struct kirin_plane *kplane;
enum drm_plane_type type; enum drm_plane_type type;
int prim_plane;
int ret; int ret;
u32 ch; u32 ch;
...@@ -1024,14 +1026,15 @@ static int ade_drm_init(struct platform_device *pdev) ...@@ -1024,14 +1026,15 @@ static int ade_drm_init(struct platform_device *pdev)
else else
type = DRM_PLANE_TYPE_OVERLAY; type = DRM_PLANE_TYPE_OVERLAY;
ret = ade_plane_init(dev, kplane, type); ret = kirin_drm_plane_init(dev, kplane, type);
if (ret) if (ret)
return ret; return ret;
} }
/* crtc init */ /* crtc init */
ret = ade_crtc_init(dev, &kcrtc->base, prim_plane = ade_driver_data.prim_plane;
&ade->planes[ade_driver_data.prim_plane].base); ret = kirin_drm_crtc_init(dev, &kcrtc->base,
&ade->planes[prim_plane].base);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment