Skip to content

Commit dd64d8a

Browse files
committed
Merge tag 'drm-intel-fixes-2023-08-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Fix the flow for ignoring GuC SLPC efficient frequency selection (Vinay) - Fix SDVO panel_type initialization (Jani) - Fix display probe for IVB Q and IVB D GT2 server (Jani) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ZN4yduyBU1Ev9dc7@intel.com
2 parents 2ccdd1b + 423ffe6 commit dd64d8a

File tree

3 files changed

+36
-12
lines changed

3 files changed

+36
-12
lines changed

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

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,24 @@ static const struct intel_display_device_info xe_lpdp_display = {
662662
BIT(TRANSCODER_C) | BIT(TRANSCODER_D),
663663
};
664664

665+
/*
666+
* Separate detection for no display cases to keep the display id array simple.
667+
*
668+
* IVB Q requires subvendor and subdevice matching to differentiate from IVB D
669+
* GT2 server.
670+
*/
671+
static bool has_no_display(struct pci_dev *pdev)
672+
{
673+
static const struct pci_device_id ids[] = {
674+
INTEL_IVB_Q_IDS(0),
675+
{}
676+
};
677+
678+
return pci_match_id(ids, pdev);
679+
}
680+
665681
#undef INTEL_VGA_DEVICE
666-
#undef INTEL_QUANTA_VGA_DEVICE
667682
#define INTEL_VGA_DEVICE(id, info) { id, info }
668-
#define INTEL_QUANTA_VGA_DEVICE(info) { 0x16a, info }
669683

670684
static const struct {
671685
u32 devid;
@@ -690,7 +704,6 @@ static const struct {
690704
INTEL_IRONLAKE_M_IDS(&ilk_m_display),
691705
INTEL_SNB_D_IDS(&snb_display),
692706
INTEL_SNB_M_IDS(&snb_display),
693-
INTEL_IVB_Q_IDS(NULL), /* must be first IVB in list */
694707
INTEL_IVB_M_IDS(&ivb_display),
695708
INTEL_IVB_D_IDS(&ivb_display),
696709
INTEL_HSW_IDS(&hsw_display),
@@ -775,6 +788,11 @@ intel_display_device_probe(struct drm_i915_private *i915, bool has_gmdid,
775788
if (has_gmdid)
776789
return probe_gmdid_display(i915, gmdid_ver, gmdid_rel, gmdid_step);
777790

791+
if (has_no_display(pdev)) {
792+
drm_dbg_kms(&i915->drm, "Device doesn't have display\n");
793+
return &no_display;
794+
}
795+
778796
for (i = 0; i < ARRAY_SIZE(intel_display_ids); i++) {
779797
if (intel_display_ids[i].devid == pdev->device)
780798
return intel_display_ids[i].info;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2752,7 +2752,7 @@ static struct intel_sdvo_connector *intel_sdvo_connector_alloc(void)
27522752
__drm_atomic_helper_connector_reset(&sdvo_connector->base.base,
27532753
&conn_state->base.base);
27542754

2755-
INIT_LIST_HEAD(&sdvo_connector->base.panel.fixed_modes);
2755+
intel_panel_init_alloc(&sdvo_connector->base);
27562756

27572757
return sdvo_connector;
27582758
}

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

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,19 @@ int intel_guc_slpc_set_ignore_eff_freq(struct intel_guc_slpc *slpc, bool val)
470470
ret = slpc_set_param(slpc,
471471
SLPC_PARAM_IGNORE_EFFICIENT_FREQUENCY,
472472
val);
473-
if (ret)
473+
if (ret) {
474474
guc_probe_error(slpc_to_guc(slpc), "Failed to set efficient freq(%d): %pe\n",
475475
val, ERR_PTR(ret));
476-
else
476+
} else {
477477
slpc->ignore_eff_freq = val;
478478

479+
/* Set min to RPn when we disable efficient freq */
480+
if (val)
481+
ret = slpc_set_param(slpc,
482+
SLPC_PARAM_GLOBAL_MIN_GT_UNSLICE_FREQ_MHZ,
483+
slpc->min_freq);
484+
}
485+
479486
intel_runtime_pm_put(&i915->runtime_pm, wakeref);
480487
mutex_unlock(&slpc->lock);
481488
return ret;
@@ -602,9 +609,8 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
602609
return ret;
603610

604611
if (!slpc->min_freq_softlimit) {
605-
ret = intel_guc_slpc_get_min_freq(slpc, &slpc->min_freq_softlimit);
606-
if (unlikely(ret))
607-
return ret;
612+
/* Min softlimit is initialized to RPn */
613+
slpc->min_freq_softlimit = slpc->min_freq;
608614
slpc_to_gt(slpc)->defaults.min_freq = slpc->min_freq_softlimit;
609615
} else {
610616
return intel_guc_slpc_set_min_freq(slpc,
@@ -755,6 +761,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
755761
return ret;
756762
}
757763

764+
/* Set cached value of ignore efficient freq */
765+
intel_guc_slpc_set_ignore_eff_freq(slpc, slpc->ignore_eff_freq);
766+
758767
/* Revert SLPC min/max to softlimits if necessary */
759768
ret = slpc_set_softlimits(slpc);
760769
if (unlikely(ret)) {
@@ -765,9 +774,6 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
765774
/* Set cached media freq ratio mode */
766775
intel_guc_slpc_set_media_ratio_mode(slpc, slpc->media_ratio_mode);
767776

768-
/* Set cached value of ignore efficient freq */
769-
intel_guc_slpc_set_ignore_eff_freq(slpc, slpc->ignore_eff_freq);
770-
771777
return 0;
772778
}
773779

0 commit comments

Comments
 (0)