drm: kirin: Dynamically allocate the hw_ctx
authorXu YiPing <xuyiping@hisilicon.com>
Tue, 20 Aug 2019 23:06:09 +0000 (23:06 +0000)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 21 Aug 2019 17:15:36 +0000 (19:15 +0200)
commit43774b0eed5612a8830b82cb7122beb6d05b5ac5
tree9ce1b1f79f699c37ce619a6f7ea59c7e392ab1fd
parentada7f67da99def9fcbbd99dd03f323bc0182d21c
drm: kirin: Dynamically allocate the hw_ctx

As part of refactoring the kirin driver to better support
different hardware revisions, this patch modifies the
initialization function to dynamically allocate the ade_hw_ctx
structure previously kept as part of struct ade_data.

This is done so that later we can have the hw_ctx point to
hardware revision specific ctx structures.

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-9-john.stultz@linaro.org
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c