Skip to content

Commit 95b4011

Browse files
committed
Merge tag 'drm-fixes-2021-12-24' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Happy Xmas. Nothing major, one mediatek and a couple of i915 locking fixes. There might be a few stragglers over next week or so but I don't expect much before next release. mediatek: - NULL pointer check i915: - guc submission locking fixes" * tag 'drm-fixes-2021-12-24' of git://anongit.freedesktop.org/drm/drm: drm/i915/guc: Only assign guc_id.id when stealing guc_id drm/i915/guc: Use correct context lock when callig clr_context_registered drm/mediatek: hdmi: Perform NULL pointer check for mtk_hdmi_conf
2 parents a026fa5 + dbfba78 commit 95b4011

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,11 +1662,11 @@ static int steal_guc_id(struct intel_guc *guc, struct intel_context *ce)
16621662
GEM_BUG_ON(intel_context_is_parent(cn));
16631663

16641664
list_del_init(&cn->guc_id.link);
1665-
ce->guc_id = cn->guc_id;
1665+
ce->guc_id.id = cn->guc_id.id;
16661666

1667-
spin_lock(&ce->guc_state.lock);
1667+
spin_lock(&cn->guc_state.lock);
16681668
clr_context_registered(cn);
1669-
spin_unlock(&ce->guc_state.lock);
1669+
spin_unlock(&cn->guc_state.lock);
16701670

16711671
set_context_guc_id_invalid(cn);
16721672

drivers/gpu/drm/mediatek/mtk_hdmi.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,12 +1224,14 @@ static int mtk_hdmi_bridge_mode_valid(struct drm_bridge *bridge,
12241224
return MODE_BAD;
12251225
}
12261226

1227-
if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode))
1228-
return MODE_BAD;
1227+
if (hdmi->conf) {
1228+
if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode))
1229+
return MODE_BAD;
12291230

1230-
if (hdmi->conf->max_mode_clock &&
1231-
mode->clock > hdmi->conf->max_mode_clock)
1232-
return MODE_CLOCK_HIGH;
1231+
if (hdmi->conf->max_mode_clock &&
1232+
mode->clock > hdmi->conf->max_mode_clock)
1233+
return MODE_CLOCK_HIGH;
1234+
}
12331235

12341236
if (mode->clock < 27000)
12351237
return MODE_CLOCK_LOW;

0 commit comments

Comments
 (0)