@@ -133,11 +133,11 @@ static void armada_drm_crtc_update(struct armada_crtc *dcrtc)
* The non-inverted state of the sync signals is active high.
* Setting these bits makes the appropriate signal active low.
*/
- if (dcrtc->crtc.mode.flags & DRM_MODE_FLAG_NCSYNC)
+ if (dcrtc->crtc.hwmode.flags & DRM_MODE_FLAG_NCSYNC)
dumb_ctrl |= CFG_INV_CSYNC;
- if (dcrtc->crtc.mode.flags & DRM_MODE_FLAG_NHSYNC)
+ if (dcrtc->crtc.hwmode.flags & DRM_MODE_FLAG_NHSYNC)
dumb_ctrl |= CFG_INV_HSYNC;
- if (dcrtc->crtc.mode.flags & DRM_MODE_FLAG_NVSYNC)
+ if (dcrtc->crtc.hwmode.flags & DRM_MODE_FLAG_NVSYNC)
dumb_ctrl |= CFG_INV_VSYNC;
if (dcrtc->dumb_ctrl != dumb_ctrl) {
@@ -457,7 +457,7 @@ void armada_drm_crtc_enable_irq(struct armada_crtc *dcrtc, u32 mask)
static uint32_t armada_drm_crtc_calculate_csc(struct armada_crtc *dcrtc)
{
- struct drm_display_mode *adj = &dcrtc->crtc.mode;
+ struct drm_display_mode *adj = &dcrtc->crtc.hwmode;
uint32_t val = 0;
if (dcrtc->csc_yuv_mode == CSC_YUV_CCIR709)
@@ -531,8 +531,6 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc,
drm_crtc_vblank_off(crtc);
- crtc->mode = *adj;
-
val = dcrtc->dumb_ctrl & ~CFG_DUMB_ENA;
if (val != dcrtc->dumb_ctrl) {
dcrtc->dumb_ctrl = val;
@@ -735,10 +733,10 @@ static int armada_drm_crtc_cursor_update(struct armada_crtc *dcrtc, bool reload)
xoff = -dcrtc->cursor_x;
xscr = 0;
w -= min(xoff, w);
- } else if (dcrtc->cursor_x + w > dcrtc->crtc.mode.hdisplay) {
+ } else if (dcrtc->cursor_x + w > dcrtc->crtc.hwmode.hdisplay) {
xoff = 0;
xscr = dcrtc->cursor_x;
- w = max_t(int, dcrtc->crtc.mode.hdisplay - dcrtc->cursor_x, 0);
+ w = max_t(int, dcrtc->crtc.hwmode.hdisplay - dcrtc->cursor_x, 0);
} else {
xoff = 0;
xscr = dcrtc->cursor_x;
@@ -748,10 +746,10 @@ static int armada_drm_crtc_cursor_update(struct armada_crtc *dcrtc, bool reload)
yoff = -dcrtc->cursor_y;
yscr = 0;
h -= min(yoff, h);
- } else if (dcrtc->cursor_y + h > dcrtc->crtc.mode.vdisplay) {
+ } else if (dcrtc->cursor_y + h > dcrtc->crtc.hwmode.vdisplay) {
yoff = 0;
yscr = dcrtc->cursor_y;
- h = max_t(int, dcrtc->crtc.mode.vdisplay - dcrtc->cursor_y, 0);
+ h = max_t(int, dcrtc->crtc.hwmode.vdisplay - dcrtc->cursor_y, 0);
} else {
yoff = 0;
yscr = dcrtc->cursor_y;
crtc->hwmode contains the adjusted_mode from mode_set; no reason to overwrite crtc->mode (the user-specified mode) with this anymore. Signed-off-by: Daniel Stone <daniels@collabora.com> --- drivers/gpu/drm/armada/armada_crtc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)