mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-27 01:11:31 +00:00
drm/amdgpu: Initialize dce_virtual_crtc_funcs. (v2)
For virtual display feature, initialize dce_virtual_crtc_funcs. v2: agd: rebase on upstream Signed-off-by: Emily Deng <Emily.Deng@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f1f5ef9267
commit
0d43f3bca1
1 changed files with 28 additions and 4 deletions
|
|
@ -125,13 +125,37 @@ static void dce_virtual_bandwidth_update(struct amdgpu_device *adev)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int dce_virtual_crtc_gamma_set(struct drm_crtc *crtc, u16 *red,
|
||||||
|
u16 *green, u16 *blue, uint32_t size)
|
||||||
|
{
|
||||||
|
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* userspace palettes are always correct as is */
|
||||||
|
for (i = 0; i < size; i++) {
|
||||||
|
amdgpu_crtc->lut_r[i] = red[i] >> 6;
|
||||||
|
amdgpu_crtc->lut_g[i] = green[i] >> 6;
|
||||||
|
amdgpu_crtc->lut_b[i] = blue[i] >> 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dce_virtual_crtc_destroy(struct drm_crtc *crtc)
|
||||||
|
{
|
||||||
|
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
|
||||||
|
|
||||||
|
drm_crtc_cleanup(crtc);
|
||||||
|
kfree(amdgpu_crtc);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct drm_crtc_funcs dce_virtual_crtc_funcs = {
|
static const struct drm_crtc_funcs dce_virtual_crtc_funcs = {
|
||||||
.cursor_set2 = NULL,
|
.cursor_set2 = NULL,
|
||||||
.cursor_move = NULL,
|
.cursor_move = NULL,
|
||||||
.gamma_set = NULL,
|
.gamma_set = dce_virtual_crtc_gamma_set,
|
||||||
.set_config = NULL,
|
.set_config = amdgpu_crtc_set_config,
|
||||||
.destroy = NULL,
|
.destroy = dce_virtual_crtc_destroy,
|
||||||
.page_flip = NULL,
|
.page_flip = amdgpu_crtc_page_flip,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void dce_virtual_crtc_dpms(struct drm_crtc *crtc, int mode)
|
static void dce_virtual_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue