drm: kirin: Add alloc_hw_ctx/clean_hw_ctx ops in driver data
authorXu YiPing <xuyiping@hisilicon.com>
Tue, 20 Aug 2019 23:06:24 +0000 (23:06 +0000)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 21 Aug 2019 17:15:45 +0000 (19:15 +0200)
commit2e89b4fbca8f8e6bdb674ae9778e7a0fd22b28ff
tree635719c5aba775b5512a2f420f781210404e1c3f
parent27dd04a59158f2c52974c3691163b8014c8195f1
drm: kirin: Add alloc_hw_ctx/clean_hw_ctx ops in driver data

As part of refactoring the kirin driver to better support
different hardware revisions, this patch changes the
alloc/clean_hw_ctx functions to be called via driver_data
specific funciton pointers.

This will allow the ade_drm_init to later be made generic and
moved to kirin_drm_drv.c

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: Xinliang Liu <z.liuxinliang@hisilicon.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com>
[jstultz: Reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-24-john.stultz@linaro.org
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h