Skip to content

Commit 86e43b8

Browse files
committed
Merge tag 'drm-fixes-2020-05-29-1' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "A couple of amdgpu fixes and minor ingenic fixes: amdgpu: - display atomic test fix - Fix soft hang in display vupdate code ingenic: - fix pointer cast - fix crtc atomic check callback" * tag 'drm-fixes-2020-05-29-1' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: Fix potential integer wraparound resulting in a hang drm/amd/display: drop cursor position check in atomic test gpu/drm: Ingenic: Fix opaque pointer casted to wrong type gpu/drm: ingenic: Fix bogus crtc_atomic_check callback
2 parents 75caf31 + ed9244b commit 86e43b8

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7880,13 +7880,6 @@ static int dm_update_plane_state(struct dc *dc,
78807880
return -EINVAL;
78817881
}
78827882

7883-
if (new_plane_state->crtc_x <= -new_acrtc->max_cursor_width ||
7884-
new_plane_state->crtc_y <= -new_acrtc->max_cursor_height) {
7885-
DRM_DEBUG_ATOMIC("Bad cursor position %d, %d\n",
7886-
new_plane_state->crtc_x, new_plane_state->crtc_y);
7887-
return -EINVAL;
7888-
}
7889-
78907883
return 0;
78917884
}
78927885

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,6 +1684,8 @@ static void delay_cursor_until_vupdate(struct dc *dc, struct pipe_ctx *pipe_ctx)
16841684
return;
16851685

16861686
/* Stall out until the cursor update completes. */
1687+
if (vupdate_end < vupdate_start)
1688+
vupdate_end += stream->timing.v_total;
16871689
us_vupdate = (vupdate_end - vupdate_start + 1) * us_per_line;
16881690
udelay(us_to_vupdate + us_vupdate);
16891691
}

drivers/gpu/drm/ingenic/ingenic-drm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ static int ingenic_drm_crtc_atomic_check(struct drm_crtc *crtc,
328328
if (!drm_atomic_crtc_needs_modeset(state))
329329
return 0;
330330

331-
if (state->mode.hdisplay > priv->soc_info->max_height ||
332-
state->mode.vdisplay > priv->soc_info->max_width)
331+
if (state->mode.hdisplay > priv->soc_info->max_width ||
332+
state->mode.vdisplay > priv->soc_info->max_height)
333333
return -EINVAL;
334334

335335
rate = clk_round_rate(priv->pix_clk,
@@ -474,7 +474,7 @@ static int ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder,
474474

475475
static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg)
476476
{
477-
struct ingenic_drm *priv = arg;
477+
struct ingenic_drm *priv = drm_device_get_priv(arg);
478478
unsigned int state;
479479

480480
regmap_read(priv->map, JZ_REG_LCD_STATE, &state);

0 commit comments

Comments
 (0)