diff mbox

[17/33] drm/i915: Pass VLV_DISPLAY_BASE + reg to intel_init_{sdvo, hdmi, dp} on VLV

Message ID 1359034198-19678-18-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjala Jan. 24, 2013, 1:29 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

When passing the DP/HDMI/SDVO registers to the encoder init functions,
include the VLV specific offset in the value.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Daniel Vetter Jan. 24, 2013, 10:05 p.m. UTC | #1
On Thu, Jan 24, 2013 at 03:29:42PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> When passing the DP/HDMI/SDVO registers to the encoder init functions,
> include the VLV specific offset in the value.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 26df9e3..60b5112 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8230,20 +8230,20 @@ static void intel_setup_outputs(struct drm_device *dev)
>  		int found;
>  
>  		/* Check for built-in panel first. Shares lanes with HDMI on SDVOC */
> -		if (I915_READ(DP_C) & DP_DETECTED)
> -			intel_dp_init(dev, DP_C, PORT_C);
> +		if (I915_READ(VLV_DISPLAY_BASE + DP_C) & DP_DETECTED)
> +			intel_dp_init(dev, VLV_DISPLAY_BASE + DP_C, PORT_C);
>  
> -		if (I915_READ(SDVOB) & PORT_DETECTED) {
> +		if (I915_READ(VLV_DISPLAY_BASE + SDVOB) & PORT_DETECTED) {
>  			/* SDVOB multiplex with HDMIB */
> -			found = intel_sdvo_init(dev, SDVOB, true);
> +			found = intel_sdvo_init(dev, VLV_DISPLAY_BASE + SDVOB, true);

I think we should kill the intel_sdvo_init copy&pasta here beforehand. Or
notice that we have a big problem and need to fixup sdvo support ...
-Daniel

>  			if (!found)
> -				intel_hdmi_init(dev, SDVOB, PORT_B);
> -			if (!found && (I915_READ(DP_B) & DP_DETECTED))
> -				intel_dp_init(dev, DP_B, PORT_B);
> +				intel_hdmi_init(dev, VLV_DISPLAY_BASE + SDVOB, PORT_B);
> +			if (!found && (I915_READ(VLV_DISPLAY_BASE + DP_B) & DP_DETECTED))
> +				intel_dp_init(dev, VLV_DISPLAY_BASE + DP_B, PORT_B);
>  		}
>  
> -		if (I915_READ(SDVOC) & PORT_DETECTED)
> -			intel_hdmi_init(dev, SDVOC, PORT_C);
> +		if (I915_READ(VLV_DISPLAY_BASE + SDVOC) & PORT_DETECTED)
> +			intel_hdmi_init(dev, VLV_DISPLAY_BASE + SDVOC, PORT_C);
>  
>  	} else if (SUPPORTS_DIGITAL_OUTPUTS(dev)) {
>  		bool found = false;
> -- 
> 1.7.12.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjala Jan. 25, 2013, 12:03 p.m. UTC | #2
On Thu, Jan 24, 2013 at 11:05:21PM +0100, Daniel Vetter wrote:
> On Thu, Jan 24, 2013 at 03:29:42PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > When passing the DP/HDMI/SDVO registers to the encoder init functions,
> > include the VLV specific offset in the value.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 26df9e3..60b5112 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -8230,20 +8230,20 @@ static void intel_setup_outputs(struct drm_device *dev)
> >  		int found;
> >  
> >  		/* Check for built-in panel first. Shares lanes with HDMI on SDVOC */
> > -		if (I915_READ(DP_C) & DP_DETECTED)
> > -			intel_dp_init(dev, DP_C, PORT_C);
> > +		if (I915_READ(VLV_DISPLAY_BASE + DP_C) & DP_DETECTED)
> > +			intel_dp_init(dev, VLV_DISPLAY_BASE + DP_C, PORT_C);
> >  
> > -		if (I915_READ(SDVOB) & PORT_DETECTED) {
> > +		if (I915_READ(VLV_DISPLAY_BASE + SDVOB) & PORT_DETECTED) {
> >  			/* SDVOB multiplex with HDMIB */
> > -			found = intel_sdvo_init(dev, SDVOB, true);
> > +			found = intel_sdvo_init(dev, VLV_DISPLAY_BASE + SDVOB, true);
> 
> I think we should kill the intel_sdvo_init copy&pasta here beforehand. Or
> notice that we have a big problem and need to fixup sdvo support ...

I think Jesse something like that lined up. Should we wait for that, or
do you want me to make a quick fix?
Daniel Vetter Jan. 25, 2013, 4:02 p.m. UTC | #3
On Fri, Jan 25, 2013 at 02:03:40PM +0200, Ville Syrjälä wrote:
> On Thu, Jan 24, 2013 at 11:05:21PM +0100, Daniel Vetter wrote:
> > On Thu, Jan 24, 2013 at 03:29:42PM +0200, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > When passing the DP/HDMI/SDVO registers to the encoder init functions,
> > > include the VLV specific offset in the value.
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_display.c | 18 +++++++++---------
> > >  1 file changed, 9 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > > index 26df9e3..60b5112 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -8230,20 +8230,20 @@ static void intel_setup_outputs(struct drm_device *dev)
> > >  		int found;
> > >  
> > >  		/* Check for built-in panel first. Shares lanes with HDMI on SDVOC */
> > > -		if (I915_READ(DP_C) & DP_DETECTED)
> > > -			intel_dp_init(dev, DP_C, PORT_C);
> > > +		if (I915_READ(VLV_DISPLAY_BASE + DP_C) & DP_DETECTED)
> > > +			intel_dp_init(dev, VLV_DISPLAY_BASE + DP_C, PORT_C);
> > >  
> > > -		if (I915_READ(SDVOB) & PORT_DETECTED) {
> > > +		if (I915_READ(VLV_DISPLAY_BASE + SDVOB) & PORT_DETECTED) {
> > >  			/* SDVOB multiplex with HDMIB */
> > > -			found = intel_sdvo_init(dev, SDVOB, true);
> > > +			found = intel_sdvo_init(dev, VLV_DISPLAY_BASE + SDVOB, true);
> > 
> > I think we should kill the intel_sdvo_init copy&pasta here beforehand. Or
> > notice that we have a big problem and need to fixup sdvo support ...
> 
> I think Jesse something like that lined up. Should we wait for that, or
> do you want me to make a quick fix?

I'd vote for a quick fix first to remove sdvo, preferrably acked by Jesse,
then your conversion patch here on top. But if Jesse is awol, we can do it
the other way round, too.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 26df9e3..60b5112 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8230,20 +8230,20 @@  static void intel_setup_outputs(struct drm_device *dev)
 		int found;
 
 		/* Check for built-in panel first. Shares lanes with HDMI on SDVOC */
-		if (I915_READ(DP_C) & DP_DETECTED)
-			intel_dp_init(dev, DP_C, PORT_C);
+		if (I915_READ(VLV_DISPLAY_BASE + DP_C) & DP_DETECTED)
+			intel_dp_init(dev, VLV_DISPLAY_BASE + DP_C, PORT_C);
 
-		if (I915_READ(SDVOB) & PORT_DETECTED) {
+		if (I915_READ(VLV_DISPLAY_BASE + SDVOB) & PORT_DETECTED) {
 			/* SDVOB multiplex with HDMIB */
-			found = intel_sdvo_init(dev, SDVOB, true);
+			found = intel_sdvo_init(dev, VLV_DISPLAY_BASE + SDVOB, true);
 			if (!found)
-				intel_hdmi_init(dev, SDVOB, PORT_B);
-			if (!found && (I915_READ(DP_B) & DP_DETECTED))
-				intel_dp_init(dev, DP_B, PORT_B);
+				intel_hdmi_init(dev, VLV_DISPLAY_BASE + SDVOB, PORT_B);
+			if (!found && (I915_READ(VLV_DISPLAY_BASE + DP_B) & DP_DETECTED))
+				intel_dp_init(dev, VLV_DISPLAY_BASE + DP_B, PORT_B);
 		}
 
-		if (I915_READ(SDVOC) & PORT_DETECTED)
-			intel_hdmi_init(dev, SDVOC, PORT_C);
+		if (I915_READ(VLV_DISPLAY_BASE + SDVOC) & PORT_DETECTED)
+			intel_hdmi_init(dev, VLV_DISPLAY_BASE + SDVOC, PORT_C);
 
 	} else if (SUPPORTS_DIGITAL_OUTPUTS(dev)) {
 		bool found = false;