diff mbox series

[03/10] drm/i915/display: check platforms without display one level higher

Message ID 78d5d326c4c89f1942f120655c279c9274e96bfb.1716399081.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: identify all platforms in display probe | expand

Commit Message

Jani Nikula May 22, 2024, 5:33 p.m. UTC
The main change here is that the check for platforms without display is
now also done for GMD ID based platforms. However, without matches, the
end result is the same.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_device.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Rodrigo Vivi May 22, 2024, 7:58 p.m. UTC | #1
On Wed, May 22, 2024 at 08:33:40PM +0300, Jani Nikula wrote:
> The main change here is that the check for platforms without display is
> now also done for GMD ID based platforms. However, without matches, the
> end result is the same.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_device.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
> index 03181bb79d21..f548a7b0ec23 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> @@ -912,11 +912,6 @@ probe_display(struct drm_i915_private *i915)
>  	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
>  	int i;
>  
> -	if (has_no_display(pdev)) {
> -		drm_dbg_kms(&i915->drm, "Device doesn't have display\n");
> -		return NULL;
> -	}
> -
>  	for (i = 0; i < ARRAY_SIZE(intel_display_ids); i++) {
>  		if (intel_display_ids[i].devid == pdev->device)
>  			return intel_display_ids[i].info;
> @@ -930,6 +925,7 @@ probe_display(struct drm_i915_private *i915)
>  
>  void intel_display_device_probe(struct drm_i915_private *i915)
>  {
> +	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
>  	const struct intel_display_device_info *info;
>  	u16 ver, rel, step;
>  
> @@ -938,6 +934,11 @@ void intel_display_device_probe(struct drm_i915_private *i915)
>  
>  	intel_display_params_copy(&i915->display.params);
>  
> +	if (has_no_display(pdev)) {
> +		drm_dbg_kms(&i915->drm, "Device doesn't have display\n");
> +		goto no_display;
> +	}
> +
>  	if (HAS_GMD_ID(i915))
>  		info = probe_gmdid_display(i915, &ver, &rel, &step);
>  	else
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
index 03181bb79d21..f548a7b0ec23 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.c
+++ b/drivers/gpu/drm/i915/display/intel_display_device.c
@@ -912,11 +912,6 @@  probe_display(struct drm_i915_private *i915)
 	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
 	int i;
 
-	if (has_no_display(pdev)) {
-		drm_dbg_kms(&i915->drm, "Device doesn't have display\n");
-		return NULL;
-	}
-
 	for (i = 0; i < ARRAY_SIZE(intel_display_ids); i++) {
 		if (intel_display_ids[i].devid == pdev->device)
 			return intel_display_ids[i].info;
@@ -930,6 +925,7 @@  probe_display(struct drm_i915_private *i915)
 
 void intel_display_device_probe(struct drm_i915_private *i915)
 {
+	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
 	const struct intel_display_device_info *info;
 	u16 ver, rel, step;
 
@@ -938,6 +934,11 @@  void intel_display_device_probe(struct drm_i915_private *i915)
 
 	intel_display_params_copy(&i915->display.params);
 
+	if (has_no_display(pdev)) {
+		drm_dbg_kms(&i915->drm, "Device doesn't have display\n");
+		goto no_display;
+	}
+
 	if (HAS_GMD_ID(i915))
 		info = probe_gmdid_display(i915, &ver, &rel, &step);
 	else