[Intel-gfx] [PATCH 1/4] drm/i915/display: Use drm_device alias if defined

Andi Shyti andi.shyti at linux.intel.com
Mon Oct 3 23:45:30 UTC 2022


Hi Andrzej,

[...]

> @@ -847,7 +847,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
>  	}
>  
>  	if (!dev_priv->display.vbt.int_lvds_support) {
> -		drm_dbg_kms(&dev_priv->drm,
> +		drm_dbg_kms(dev,
>  			    "Internal LVDS support disabled by VBT\n");

you don't need to break this anymore

>  		return;
>  	}
> @@ -867,11 +867,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
>  	pin = GMBUS_PIN_PANEL;
>  	if (!intel_bios_is_lvds_present(dev_priv, &pin)) {
>  		if ((lvds & LVDS_PORT_EN) == 0) {
> -			drm_dbg_kms(&dev_priv->drm,
> +			drm_dbg_kms(dev,
>  				    "LVDS is not present in VBT\n");

here, as well (and so on for the rest)

With the above:

Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com>

Andi

>  			return;
>  		}
> -		drm_dbg_kms(&dev_priv->drm,
> +		drm_dbg_kms(dev,
>  			    "LVDS is not present in VBT, but enabled anyway\n");
>  	}
>  
> @@ -993,7 +993,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
>  	intel_backlight_setup(intel_connector, INVALID_PIPE);
>  
>  	lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
> -	drm_dbg_kms(&dev_priv->drm, "detected %s-link lvds configuration\n",
> +	drm_dbg_kms(dev, "detected %s-link lvds configuration\n",
>  		    lvds_encoder->is_dual_link ? "dual" : "single");
>  
>  	lvds_encoder->a3_power = lvds & LVDS_A3_POWER_MASK;
> @@ -1001,7 +1001,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
>  	return;
>  
>  failed:
> -	drm_dbg_kms(&dev_priv->drm, "No LVDS modes found, disabling.\n");
> +	drm_dbg_kms(dev, "No LVDS modes found, disabling.\n");
>  	drm_connector_cleanup(connector);
>  	drm_encoder_cleanup(encoder);
>  	kfree(lvds_encoder);
> diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c
> index caa07ef34f21ef..ba3666e94fc48d 100644
> --- a/drivers/gpu/drm/i915/display/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/display/intel_opregion.c
> @@ -465,7 +465,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)
>  	struct opregion_asle *asle = dev_priv->display.opregion.asle;
>  	struct drm_device *dev = &dev_priv->drm;
>  
> -	drm_dbg(&dev_priv->drm, "bclp = 0x%08x\n", bclp);
> +	drm_dbg(dev, "bclp = 0x%08x\n", bclp);
>  
>  	if (acpi_video_get_backlight_type() == acpi_backlight_native) {
>  		drm_dbg_kms(&dev_priv->drm,
> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> index dee0147a316ce7..fdfe3611e74a76 100644
> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> @@ -1855,7 +1855,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
>  	enum port port;
>  	enum pipe pipe;
>  
> -	drm_dbg_kms(&dev_priv->drm, "\n");
> +	drm_dbg_kms(dev, "\n");
>  
>  	/* There is no detection method for MIPI so rely on VBT */
>  	if (!intel_bios_is_dsi_present(dev_priv, &port))
> -- 
> 2.34.1


More information about the Intel-gfx mailing list