Skip to content

Commit bfe632f

Browse files
committed
Merge tag 'drm-intel-fixes-2022-09-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Fix for a null pointer dereference (Lukasz) - HDMI related quirk for ECS Liva Q2 with GLK graphics (Diego) - Skip wm/ddb readout for disabled pipes (Ville) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/YxC3GmSOpDiZTdIJ@intel.com
2 parents d7df5e2 + 0211c2a commit bfe632f

3 files changed

Lines changed: 19 additions & 8 deletions

File tree

drivers/gpu/drm/i915/display/intel_bw.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,17 @@ static int tgl_get_bw_info(struct drm_i915_private *dev_priv, const struct intel
404404
int clpchgroup;
405405
int j;
406406

407-
if (i < num_groups - 1)
408-
bi_next = &dev_priv->max_bw[i + 1];
409-
410407
clpchgroup = (sa->deburst * qi.deinterleave / num_channels) << i;
411408

412-
if (i < num_groups - 1 && clpchgroup < clperchgroup)
413-
bi_next->num_planes = (ipqdepth - clpchgroup) / clpchgroup + 1;
414-
else
415-
bi_next->num_planes = 0;
409+
if (i < num_groups - 1) {
410+
bi_next = &dev_priv->max_bw[i + 1];
411+
412+
if (clpchgroup < clperchgroup)
413+
bi_next->num_planes = (ipqdepth - clpchgroup) /
414+
clpchgroup + 1;
415+
else
416+
bi_next->num_planes = 0;
417+
}
416418

417419
bi->num_qgv_points = qi.num_points;
418420
bi->num_psf_gv_points = qi.num_psf_points;

drivers/gpu/drm/i915/display/intel_quirks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ static struct intel_quirk intel_quirks[] = {
191191
/* ASRock ITX*/
192192
{ 0x3185, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
193193
{ 0x3184, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
194+
/* ECS Liva Q2 */
195+
{ 0x3185, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
196+
{ 0x3184, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
194197
};
195198

196199
void intel_init_quirks(struct drm_i915_private *i915)

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6561,7 +6561,10 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
65616561
enum plane_id plane_id;
65626562
u8 slices;
65636563

6564-
skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal);
6564+
memset(&crtc_state->wm.skl.optimal, 0,
6565+
sizeof(crtc_state->wm.skl.optimal));
6566+
if (crtc_state->hw.active)
6567+
skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal);
65656568
crtc_state->wm.skl.raw = crtc_state->wm.skl.optimal;
65666569

65676570
memset(&dbuf_state->ddb[pipe], 0, sizeof(dbuf_state->ddb[pipe]));
@@ -6572,6 +6575,9 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
65726575
struct skl_ddb_entry *ddb_y =
65736576
&crtc_state->wm.skl.plane_ddb_y[plane_id];
65746577

6578+
if (!crtc_state->hw.active)
6579+
continue;
6580+
65756581
skl_ddb_get_hw_plane_state(dev_priv, crtc->pipe,
65766582
plane_id, ddb, ddb_y);
65776583

0 commit comments

Comments
 (0)