drm/radeon/cik: add hw cursor support (v2)
CIK (DCE8) hw cursors are programmed the same as evergreen (DCE4) with the following caveats: - cursors are now 128x128 pixels - new alpha blend enable bit v2: rebase Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -153,7 +153,13 @@ static void dce5_crtc_load_lut(struct drm_crtc *crtc)
|
||||
NI_OUTPUT_CSC_OVL_MODE(NI_OUTPUT_CSC_BYPASS)));
|
||||
/* XXX match this to the depth of the crtc fmt block, move to modeset? */
|
||||
WREG32(0x6940 + radeon_crtc->crtc_offset, 0);
|
||||
|
||||
if (ASIC_IS_DCE8(rdev)) {
|
||||
/* XXX this only needs to be programmed once per crtc at startup,
|
||||
* not sure where the best place for it is
|
||||
*/
|
||||
WREG32(CIK_ALPHA_CONTROL + radeon_crtc->crtc_offset,
|
||||
CIK_CURSOR_ALPHA_BLND_ENA);
|
||||
}
|
||||
}
|
||||
|
||||
static void legacy_crtc_load_lut(struct drm_crtc *crtc)
|
||||
@@ -512,6 +518,14 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
|
||||
radeon_crtc->crtc_id = index;
|
||||
rdev->mode_info.crtcs[index] = radeon_crtc;
|
||||
|
||||
if (rdev->family >= CHIP_BONAIRE) {
|
||||
radeon_crtc->max_cursor_width = CIK_CURSOR_WIDTH;
|
||||
radeon_crtc->max_cursor_height = CIK_CURSOR_HEIGHT;
|
||||
} else {
|
||||
radeon_crtc->max_cursor_width = CURSOR_WIDTH;
|
||||
radeon_crtc->max_cursor_height = CURSOR_HEIGHT;
|
||||
}
|
||||
|
||||
#if 0
|
||||
radeon_crtc->mode_set.crtc = &radeon_crtc->base;
|
||||
radeon_crtc->mode_set.connectors = (struct drm_connector **)(radeon_crtc + 1);
|
||||
|
Reference in New Issue
Block a user