Commit 0d3157d0 authored by Marek Olšák's avatar Marek Olšák Committed by Alex Deucher

drm/amdgpu: add amdgpu_framebuffer::gfx12_dcc

amdgpu_framebuffer doesn't have tiling_flags, so we need this.

amdgpu_display_get_fb_info never gets NULL parameters, so checking for NULL
was useless.
Signed-off-by: default avatarMarek Olšák <marek.olsak@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent cc6e00a6
......@@ -1172,7 +1172,8 @@ static int amdgpu_display_verify_sizes(struct amdgpu_framebuffer *rfb)
}
static int amdgpu_display_get_fb_info(const struct amdgpu_framebuffer *amdgpu_fb,
uint64_t *tiling_flags, bool *tmz_surface)
uint64_t *tiling_flags, bool *tmz_surface,
bool *gfx12_dcc)
{
struct amdgpu_bo *rbo;
int r;
......@@ -1180,6 +1181,7 @@ static int amdgpu_display_get_fb_info(const struct amdgpu_framebuffer *amdgpu_fb
if (!amdgpu_fb) {
*tiling_flags = 0;
*tmz_surface = false;
*gfx12_dcc = false;
return 0;
}
......@@ -1193,11 +1195,9 @@ static int amdgpu_display_get_fb_info(const struct amdgpu_framebuffer *amdgpu_fb
return r;
}
if (tiling_flags)
amdgpu_bo_get_tiling_flags(rbo, tiling_flags);
if (tmz_surface)
*tmz_surface = amdgpu_bo_encrypted(rbo);
amdgpu_bo_get_tiling_flags(rbo, tiling_flags);
*tmz_surface = amdgpu_bo_encrypted(rbo);
*gfx12_dcc = rbo->flags & AMDGPU_GEM_CREATE_GFX12_DCC;
amdgpu_bo_unreserve(rbo);
......@@ -1266,7 +1266,8 @@ static int amdgpu_display_framebuffer_init(struct drm_device *dev,
}
}
ret = amdgpu_display_get_fb_info(rfb, &rfb->tiling_flags, &rfb->tmz_surface);
ret = amdgpu_display_get_fb_info(rfb, &rfb->tiling_flags, &rfb->tmz_surface,
&rfb->gfx12_dcc);
if (ret)
return ret;
......
......@@ -300,6 +300,7 @@ struct amdgpu_framebuffer {
uint64_t tiling_flags;
bool tmz_surface;
bool gfx12_dcc;
/* caching for later use */
uint64_t address;
......
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