Commit dd64d8ae authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-fixes-2023-08-17' of...

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: default avatarDave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZN4yduyBU1Ev9dc7@intel.com
parents 2ccdd1b1 423ffe62
...@@ -662,10 +662,24 @@ static const struct intel_display_device_info xe_lpdp_display = { ...@@ -662,10 +662,24 @@ static const struct intel_display_device_info xe_lpdp_display = {
BIT(TRANSCODER_C) | BIT(TRANSCODER_D), BIT(TRANSCODER_C) | BIT(TRANSCODER_D),
}; };
/*
* Separate detection for no display cases to keep the display id array simple.
*
* IVB Q requires subvendor and subdevice matching to differentiate from IVB D
* GT2 server.
*/
static bool has_no_display(struct pci_dev *pdev)
{
static const struct pci_device_id ids[] = {
INTEL_IVB_Q_IDS(0),
{}
};
return pci_match_id(ids, pdev);
}
#undef INTEL_VGA_DEVICE #undef INTEL_VGA_DEVICE
#undef INTEL_QUANTA_VGA_DEVICE
#define INTEL_VGA_DEVICE(id, info) { id, info } #define INTEL_VGA_DEVICE(id, info) { id, info }
#define INTEL_QUANTA_VGA_DEVICE(info) { 0x16a, info }
static const struct { static const struct {
u32 devid; u32 devid;
...@@ -690,7 +704,6 @@ static const struct { ...@@ -690,7 +704,6 @@ static const struct {
INTEL_IRONLAKE_M_IDS(&ilk_m_display), INTEL_IRONLAKE_M_IDS(&ilk_m_display),
INTEL_SNB_D_IDS(&snb_display), INTEL_SNB_D_IDS(&snb_display),
INTEL_SNB_M_IDS(&snb_display), INTEL_SNB_M_IDS(&snb_display),
INTEL_IVB_Q_IDS(NULL), /* must be first IVB in list */
INTEL_IVB_M_IDS(&ivb_display), INTEL_IVB_M_IDS(&ivb_display),
INTEL_IVB_D_IDS(&ivb_display), INTEL_IVB_D_IDS(&ivb_display),
INTEL_HSW_IDS(&hsw_display), INTEL_HSW_IDS(&hsw_display),
...@@ -775,6 +788,11 @@ intel_display_device_probe(struct drm_i915_private *i915, bool has_gmdid, ...@@ -775,6 +788,11 @@ intel_display_device_probe(struct drm_i915_private *i915, bool has_gmdid,
if (has_gmdid) if (has_gmdid)
return probe_gmdid_display(i915, gmdid_ver, gmdid_rel, gmdid_step); return probe_gmdid_display(i915, gmdid_ver, gmdid_rel, gmdid_step);
if (has_no_display(pdev)) {
drm_dbg_kms(&i915->drm, "Device doesn't have display\n");
return &no_display;
}
for (i = 0; i < ARRAY_SIZE(intel_display_ids); i++) { for (i = 0; i < ARRAY_SIZE(intel_display_ids); i++) {
if (intel_display_ids[i].devid == pdev->device) if (intel_display_ids[i].devid == pdev->device)
return intel_display_ids[i].info; return intel_display_ids[i].info;
......
...@@ -2752,7 +2752,7 @@ static struct intel_sdvo_connector *intel_sdvo_connector_alloc(void) ...@@ -2752,7 +2752,7 @@ static struct intel_sdvo_connector *intel_sdvo_connector_alloc(void)
__drm_atomic_helper_connector_reset(&sdvo_connector->base.base, __drm_atomic_helper_connector_reset(&sdvo_connector->base.base,
&conn_state->base.base); &conn_state->base.base);
INIT_LIST_HEAD(&sdvo_connector->base.panel.fixed_modes); intel_panel_init_alloc(&sdvo_connector->base);
return sdvo_connector; return sdvo_connector;
} }
......
...@@ -470,12 +470,19 @@ int intel_guc_slpc_set_ignore_eff_freq(struct intel_guc_slpc *slpc, bool val) ...@@ -470,12 +470,19 @@ int intel_guc_slpc_set_ignore_eff_freq(struct intel_guc_slpc *slpc, bool val)
ret = slpc_set_param(slpc, ret = slpc_set_param(slpc,
SLPC_PARAM_IGNORE_EFFICIENT_FREQUENCY, SLPC_PARAM_IGNORE_EFFICIENT_FREQUENCY,
val); val);
if (ret) if (ret) {
guc_probe_error(slpc_to_guc(slpc), "Failed to set efficient freq(%d): %pe\n", guc_probe_error(slpc_to_guc(slpc), "Failed to set efficient freq(%d): %pe\n",
val, ERR_PTR(ret)); val, ERR_PTR(ret));
else } else {
slpc->ignore_eff_freq = val; slpc->ignore_eff_freq = val;
/* Set min to RPn when we disable efficient freq */
if (val)
ret = slpc_set_param(slpc,
SLPC_PARAM_GLOBAL_MIN_GT_UNSLICE_FREQ_MHZ,
slpc->min_freq);
}
intel_runtime_pm_put(&i915->runtime_pm, wakeref); intel_runtime_pm_put(&i915->runtime_pm, wakeref);
mutex_unlock(&slpc->lock); mutex_unlock(&slpc->lock);
return ret; return ret;
...@@ -602,9 +609,8 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc) ...@@ -602,9 +609,8 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
return ret; return ret;
if (!slpc->min_freq_softlimit) { if (!slpc->min_freq_softlimit) {
ret = intel_guc_slpc_get_min_freq(slpc, &slpc->min_freq_softlimit); /* Min softlimit is initialized to RPn */
if (unlikely(ret)) slpc->min_freq_softlimit = slpc->min_freq;
return ret;
slpc_to_gt(slpc)->defaults.min_freq = slpc->min_freq_softlimit; slpc_to_gt(slpc)->defaults.min_freq = slpc->min_freq_softlimit;
} else { } else {
return intel_guc_slpc_set_min_freq(slpc, return intel_guc_slpc_set_min_freq(slpc,
...@@ -755,6 +761,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc) ...@@ -755,6 +761,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
return ret; return ret;
} }
/* Set cached value of ignore efficient freq */
intel_guc_slpc_set_ignore_eff_freq(slpc, slpc->ignore_eff_freq);
/* Revert SLPC min/max to softlimits if necessary */ /* Revert SLPC min/max to softlimits if necessary */
ret = slpc_set_softlimits(slpc); ret = slpc_set_softlimits(slpc);
if (unlikely(ret)) { if (unlikely(ret)) {
...@@ -765,9 +774,6 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc) ...@@ -765,9 +774,6 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
/* Set cached media freq ratio mode */ /* Set cached media freq ratio mode */
intel_guc_slpc_set_media_ratio_mode(slpc, slpc->media_ratio_mode); intel_guc_slpc_set_media_ratio_mode(slpc, slpc->media_ratio_mode);
/* Set cached value of ignore efficient freq */
intel_guc_slpc_set_ignore_eff_freq(slpc, slpc->ignore_eff_freq);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment