[PATCH 3/4] drm/amdgpu: Add type parameter to amdgpu_dm_plane_init()
Kevin Brace
kevinbrace at gmx.com
Wed Jun 19 12:28:56 UTC 2019
From: Kevin Brace <kevinbrace at bracecomputerlab.com>
Ultimately, type parameter is consumed by drm_universal_plane_init().
Signed-off-by: Kevin Brace <kevinbrace at bracecomputerlab.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index fbd2b34407d5..003ae68034c6 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -112,6 +112,7 @@ amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector);
static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
struct drm_plane *plane,
uint32_t possible_crtcs,
+ enum drm_plane_type type,
const struct dc_plane_cap *plane_cap);
static int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
struct drm_plane *plane,
@@ -2009,7 +2010,8 @@ static int initialize_plane(struct amdgpu_display_manager *dm,
if (plane_id >= dm->dc->caps.max_streams)
possible_crtcs = 0xff;
- ret = amdgpu_dm_plane_init(dm, plane, possible_crtcs, plane_cap);
+ ret = amdgpu_dm_plane_init(dm, plane, possible_crtcs,
+ type, plane_cap);
if (ret) {
DRM_ERROR("KMS: Failed to initialize plane\n");
@@ -4329,6 +4331,7 @@ static int get_plane_formats(const struct drm_plane *plane,
static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
struct drm_plane *plane,
uint32_t possible_crtcs,
+ enum drm_plane_type type,
const struct dc_plane_cap *plane_cap)
{
uint32_t formats[32];
@@ -4340,7 +4343,7 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
res = drm_universal_plane_init(dm->adev->ddev, plane, possible_crtcs,
&dm_plane_funcs, formats, num_formats,
- NULL, plane->type, NULL);
+ NULL, type, NULL);
if (res)
return res;
@@ -4388,7 +4391,8 @@ static int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
goto fail;
cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
- res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
+ res = amdgpu_dm_plane_init(dm, cursor_plane, 0,
+ DRM_PLANE_TYPE_CURSOR, NULL);
acrtc = kzalloc(sizeof(struct amdgpu_crtc), GFP_KERNEL);
if (!acrtc)
--
2.17.1
More information about the amd-gfx
mailing list