public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Ditch SUPPORTS_INTEGRATED_HDMI|DP and use IS_G4X instead
Date: Tue, 7 Jul 2015 11:07:02 +0300	[thread overview]
Message-ID: <20150707080702.GS5176@intel.com> (raw)
In-Reply-To: <1436253007-19988-1-git-send-email-daniel.vetter@ffwll.ch>

On Tue, Jul 07, 2015 at 09:10:07AM +0200, Daniel Vetter wrote:
> Since that's really what we want to test for. Note remove the gen5
> case doesn't change anything: In intel_setup_outputs ilk is handled
> already in the HAS_PCH_SPLIT case, and the register save/restore code
> touches registers which simply don't exist on ilk ...

The patch doesn't touch any register save/restore code. I guess it got
nuked since the patch was originally made?

Apart from that I like it
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Maybe kill SUPPORTS_DIGITAL_OUTPUTS() too? IMO it's just making it
harder to figure out which branch each platform takes in
intel_setup_outputs().

> 
> v2: Drop UMS parts.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Conflicts:
> 	drivers/gpu/drm/i915/i915_drv.h
> 	drivers/gpu/drm/i915/i915_ums.c
> ---
>  drivers/gpu/drm/i915/i915_drv.h      |  2 --
>  drivers/gpu/drm/i915/intel_display.c | 10 +++++-----
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 1dbd95710bf4..0d9a60b9e6c5 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2512,8 +2512,6 @@ struct drm_i915_cmd_table {
>  #define HAS_128_BYTE_Y_TILING(dev) (!IS_GEN2(dev) && !(IS_I915G(dev) || \
>  						      IS_I915GM(dev)))
>  #define SUPPORTS_DIGITAL_OUTPUTS(dev)	(!IS_GEN2(dev) && !IS_PINEVIEW(dev))
> -#define SUPPORTS_INTEGRATED_HDMI(dev)	(IS_G4X(dev) || IS_GEN5(dev))
> -#define SUPPORTS_INTEGRATED_DP(dev)	(IS_G4X(dev) || IS_GEN5(dev))
>  #define SUPPORTS_TV(dev)		(INTEL_INFO(dev)->supports_tv)
>  #define I915_HAS_HOTPLUG(dev)		 (INTEL_INFO(dev)->has_hotplug)
>  
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 724b0e3a5d37..56316c1e945c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14322,12 +14322,12 @@ static void intel_setup_outputs(struct drm_device *dev)
>  		if (I915_READ(GEN3_SDVOB) & SDVO_DETECTED) {
>  			DRM_DEBUG_KMS("probing SDVOB\n");
>  			found = intel_sdvo_init(dev, GEN3_SDVOB, true);
> -			if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) {
> +			if (!found && IS_G4X(dev)) {
>  				DRM_DEBUG_KMS("probing HDMI on SDVOB\n");
>  				intel_hdmi_init(dev, GEN4_HDMIB, PORT_B);
>  			}
>  
> -			if (!found && SUPPORTS_INTEGRATED_DP(dev))
> +			if (!found && IS_G4X(dev))
>  				intel_dp_init(dev, DP_B, PORT_B);
>  		}
>  
> @@ -14340,15 +14340,15 @@ static void intel_setup_outputs(struct drm_device *dev)
>  
>  		if (!found && (I915_READ(GEN3_SDVOC) & SDVO_DETECTED)) {
>  
> -			if (SUPPORTS_INTEGRATED_HDMI(dev)) {
> +			if (IS_G4X(dev)) {
>  				DRM_DEBUG_KMS("probing HDMI on SDVOC\n");
>  				intel_hdmi_init(dev, GEN4_HDMIC, PORT_C);
>  			}
> -			if (SUPPORTS_INTEGRATED_DP(dev))
> +			if (IS_G4X(dev))
>  				intel_dp_init(dev, DP_C, PORT_C);
>  		}
>  
> -		if (SUPPORTS_INTEGRATED_DP(dev) &&
> +		if (IS_G4X(dev) &&
>  		    (I915_READ(DP_D) & DP_DETECTED))
>  			intel_dp_init(dev, DP_D, PORT_D);
>  	} else if (IS_GEN2(dev))
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-07-07  8:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07  7:10 [PATCH] drm/i915: Ditch SUPPORTS_INTEGRATED_HDMI|DP and use IS_G4X instead Daniel Vetter
2015-07-07  8:07 ` Ville Syrjälä [this message]
2015-07-07  9:37   ` Daniel Vetter
2015-07-08  2:42 ` shuang.he

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150707080702.GS5176@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox