Commit 6a1f8cab authored by Andrey Grodzovsky's avatar Andrey Grodzovsky Committed by Alex Deucher

drm/amd/display: Pass adev to fill_plane_attr

Signed-off-by: default avatarAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent db96c69e
...@@ -411,6 +411,7 @@ static bool get_fb_info( ...@@ -411,6 +411,7 @@ static bool get_fb_info(
return true; return true;
} }
static void fill_plane_attributes_from_fb( static void fill_plane_attributes_from_fb(
struct amdgpu_device *adev,
struct dc_surface *surface, struct dc_surface *surface,
const struct amdgpu_framebuffer *amdgpu_fb, bool addReq) const struct amdgpu_framebuffer *amdgpu_fb, bool addReq)
{ {
...@@ -455,6 +456,7 @@ static void fill_plane_attributes_from_fb( ...@@ -455,6 +456,7 @@ static void fill_plane_attributes_from_fb(
memset(&surface->tiling_info, 0, sizeof(surface->tiling_info)); memset(&surface->tiling_info, 0, sizeof(surface->tiling_info));
/* Fill GFX8 params */
if (AMDGPU_TILING_GET(tiling_flags, ARRAY_MODE) == DC_ARRAY_2D_TILED_THIN1) if (AMDGPU_TILING_GET(tiling_flags, ARRAY_MODE) == DC_ARRAY_2D_TILED_THIN1)
{ {
unsigned bankw, bankh, mtaspect, tile_split, num_banks; unsigned bankw, bankh, mtaspect, tile_split, num_banks;
...@@ -540,6 +542,7 @@ static void fill_gamma_from_crtc( ...@@ -540,6 +542,7 @@ static void fill_gamma_from_crtc(
} }
static void fill_plane_attributes( static void fill_plane_attributes(
struct amdgpu_device *adev,
struct dc_surface *surface, struct dc_surface *surface,
struct drm_plane_state *state, bool addrReq) struct drm_plane_state *state, bool addrReq)
{ {
...@@ -549,6 +552,7 @@ static void fill_plane_attributes( ...@@ -549,6 +552,7 @@ static void fill_plane_attributes(
fill_rects_from_plane_state(state, surface); fill_rects_from_plane_state(state, surface);
fill_plane_attributes_from_fb( fill_plane_attributes_from_fb(
crtc->dev->dev_private,
surface, surface,
amdgpu_fb, amdgpu_fb,
addrReq); addrReq);
...@@ -662,7 +666,11 @@ static void dm_dc_surface_commit( ...@@ -662,7 +666,11 @@ static void dm_dc_surface_commit(
} }
/* Surface programming */ /* Surface programming */
fill_plane_attributes(dc_surface, crtc->primary->state, true); fill_plane_attributes(
crtc->dev->dev_private,
dc_surface,
crtc->primary->state,
true);
dc_surfaces[0] = dc_surface; dc_surfaces[0] = dc_surface;
...@@ -3026,6 +3034,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, ...@@ -3026,6 +3034,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
surface = dc_create_surface(dc); surface = dc_create_surface(dc);
fill_plane_attributes( fill_plane_attributes(
crtc->dev->dev_private,
surface, surface,
plane_state, plane_state,
false); false);
......
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