diff mbox series

[4/5] drm/i915/dp: Call hw.adjusted_mode as hw_mode for clarity

Message ID 20201027193034.28721-5-manasi.d.navare@intel.com (mailing list archive)
State New, archived
Headers show
Series Prep for Big joiner + Allow bigjoiner modes | expand

Commit Message

Navare, Manasi Oct. 27, 2020, 7:30 p.m. UTC
No functional changes just use hw_mode to retrive
hw.adjusted_mode during HW state readout for clarity
in bigjoiner case.

Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 22 +++++++++++---------
 1 file changed, 12 insertions(+), 10 deletions(-)

Comments

Ville Syrjälä Oct. 27, 2020, 8:09 p.m. UTC | #1
On Tue, Oct 27, 2020 at 12:30:33PM -0700, Manasi Navare wrote:
> No functional changes just use hw_mode to retrive
> hw.adjusted_mode during HW state readout for clarity
> in bigjoiner case.

Still don't understnad what this has to do with bigjoiner. Looks
like a simple introduction of a strangely named local variable to
me?

> 
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 22 +++++++++++---------
>  1 file changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index cabda5a02e9e..b000dd68977f 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -9119,20 +9119,22 @@ static void intel_get_pipe_src_size(struct intel_crtc *crtc,
>  void intel_mode_from_pipe_config(struct drm_display_mode *mode,
>  				 struct intel_crtc_state *pipe_config)
>  {
> -	mode->hdisplay = pipe_config->hw.adjusted_mode.crtc_hdisplay;
> -	mode->htotal = pipe_config->hw.adjusted_mode.crtc_htotal;
> -	mode->hsync_start = pipe_config->hw.adjusted_mode.crtc_hsync_start;
> -	mode->hsync_end = pipe_config->hw.adjusted_mode.crtc_hsync_end;
> +	struct drm_display_mode *hw_mode = &pipe_config->hw.adjusted_mode;
>  
> -	mode->vdisplay = pipe_config->hw.adjusted_mode.crtc_vdisplay;
> -	mode->vtotal = pipe_config->hw.adjusted_mode.crtc_vtotal;
> -	mode->vsync_start = pipe_config->hw.adjusted_mode.crtc_vsync_start;
> -	mode->vsync_end = pipe_config->hw.adjusted_mode.crtc_vsync_end;
> +	mode->hdisplay = hw_mode->crtc_hdisplay;
> +	mode->htotal = hw_mode->crtc_htotal;
> +	mode->hsync_start = hw_mode->crtc_hsync_start;
> +	mode->hsync_end = hw_mode->crtc_hsync_end;
>  
> -	mode->flags = pipe_config->hw.adjusted_mode.flags;
> +	mode->vdisplay = hw_mode->crtc_vdisplay;
> +	mode->vtotal = hw_mode->crtc_vtotal;
> +	mode->vsync_start = hw_mode->crtc_vsync_start;
> +	mode->vsync_end = hw_mode->crtc_vsync_end;
> +
> +	mode->flags = hw_mode->flags;
>  	mode->type = DRM_MODE_TYPE_DRIVER;
>  
> -	mode->clock = pipe_config->hw.adjusted_mode.crtc_clock;
> +	mode->clock = hw_mode->crtc_clock;
>  
>  	drm_mode_set_name(mode);
>  }
> -- 
> 2.19.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Navare, Manasi Oct. 27, 2020, 8:43 p.m. UTC | #2
On Tue, Oct 27, 2020 at 10:09:20PM +0200, Ville Syrjälä wrote:
> On Tue, Oct 27, 2020 at 12:30:33PM -0700, Manasi Navare wrote:
> > No functional changes just use hw_mode to retrive
> > hw.adjusted_mode during HW state readout for clarity
> > in bigjoiner case.
> 
> Still don't understnad what this has to do with bigjoiner. Looks
> like a simple introduction of a strangely named local variable to
> me?

SHould I just drop this then? Or just reword the commit message to remove
bigjoiner related stuff?

Manasi
> 
> > 
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 22 +++++++++++---------
> >  1 file changed, 12 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index cabda5a02e9e..b000dd68977f 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -9119,20 +9119,22 @@ static void intel_get_pipe_src_size(struct intel_crtc *crtc,
> >  void intel_mode_from_pipe_config(struct drm_display_mode *mode,
> >  				 struct intel_crtc_state *pipe_config)
> >  {
> > -	mode->hdisplay = pipe_config->hw.adjusted_mode.crtc_hdisplay;
> > -	mode->htotal = pipe_config->hw.adjusted_mode.crtc_htotal;
> > -	mode->hsync_start = pipe_config->hw.adjusted_mode.crtc_hsync_start;
> > -	mode->hsync_end = pipe_config->hw.adjusted_mode.crtc_hsync_end;
> > +	struct drm_display_mode *hw_mode = &pipe_config->hw.adjusted_mode;
> >  
> > -	mode->vdisplay = pipe_config->hw.adjusted_mode.crtc_vdisplay;
> > -	mode->vtotal = pipe_config->hw.adjusted_mode.crtc_vtotal;
> > -	mode->vsync_start = pipe_config->hw.adjusted_mode.crtc_vsync_start;
> > -	mode->vsync_end = pipe_config->hw.adjusted_mode.crtc_vsync_end;
> > +	mode->hdisplay = hw_mode->crtc_hdisplay;
> > +	mode->htotal = hw_mode->crtc_htotal;
> > +	mode->hsync_start = hw_mode->crtc_hsync_start;
> > +	mode->hsync_end = hw_mode->crtc_hsync_end;
> >  
> > -	mode->flags = pipe_config->hw.adjusted_mode.flags;
> > +	mode->vdisplay = hw_mode->crtc_vdisplay;
> > +	mode->vtotal = hw_mode->crtc_vtotal;
> > +	mode->vsync_start = hw_mode->crtc_vsync_start;
> > +	mode->vsync_end = hw_mode->crtc_vsync_end;
> > +
> > +	mode->flags = hw_mode->flags;
> >  	mode->type = DRM_MODE_TYPE_DRIVER;
> >  
> > -	mode->clock = pipe_config->hw.adjusted_mode.crtc_clock;
> > +	mode->clock = hw_mode->crtc_clock;
> >  
> >  	drm_mode_set_name(mode);
> >  }
> > -- 
> > 2.19.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel
Ville Syrjälä Oct. 27, 2020, 8:54 p.m. UTC | #3
On Tue, Oct 27, 2020 at 01:43:15PM -0700, Navare, Manasi wrote:
> On Tue, Oct 27, 2020 at 10:09:20PM +0200, Ville Syrjälä wrote:
> > On Tue, Oct 27, 2020 at 12:30:33PM -0700, Manasi Navare wrote:
> > > No functional changes just use hw_mode to retrive
> > > hw.adjusted_mode during HW state readout for clarity
> > > in bigjoiner case.
> > 
> > Still don't understnad what this has to do with bigjoiner. Looks
> > like a simple introduction of a strangely named local variable to
> > me?
> 
> SHould I just drop this then? Or just reword the commit message to remove
> bigjoiner related stuff?

I guess just drop it if it has no real purpose.

> 
> Manasi
> > 
> > > 
> > > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_display.c | 22 +++++++++++---------
> > >  1 file changed, 12 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > > index cabda5a02e9e..b000dd68977f 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > > @@ -9119,20 +9119,22 @@ static void intel_get_pipe_src_size(struct intel_crtc *crtc,
> > >  void intel_mode_from_pipe_config(struct drm_display_mode *mode,
> > >  				 struct intel_crtc_state *pipe_config)
> > >  {
> > > -	mode->hdisplay = pipe_config->hw.adjusted_mode.crtc_hdisplay;
> > > -	mode->htotal = pipe_config->hw.adjusted_mode.crtc_htotal;
> > > -	mode->hsync_start = pipe_config->hw.adjusted_mode.crtc_hsync_start;
> > > -	mode->hsync_end = pipe_config->hw.adjusted_mode.crtc_hsync_end;
> > > +	struct drm_display_mode *hw_mode = &pipe_config->hw.adjusted_mode;
> > >  
> > > -	mode->vdisplay = pipe_config->hw.adjusted_mode.crtc_vdisplay;
> > > -	mode->vtotal = pipe_config->hw.adjusted_mode.crtc_vtotal;
> > > -	mode->vsync_start = pipe_config->hw.adjusted_mode.crtc_vsync_start;
> > > -	mode->vsync_end = pipe_config->hw.adjusted_mode.crtc_vsync_end;
> > > +	mode->hdisplay = hw_mode->crtc_hdisplay;
> > > +	mode->htotal = hw_mode->crtc_htotal;
> > > +	mode->hsync_start = hw_mode->crtc_hsync_start;
> > > +	mode->hsync_end = hw_mode->crtc_hsync_end;
> > >  
> > > -	mode->flags = pipe_config->hw.adjusted_mode.flags;
> > > +	mode->vdisplay = hw_mode->crtc_vdisplay;
> > > +	mode->vtotal = hw_mode->crtc_vtotal;
> > > +	mode->vsync_start = hw_mode->crtc_vsync_start;
> > > +	mode->vsync_end = hw_mode->crtc_vsync_end;
> > > +
> > > +	mode->flags = hw_mode->flags;
> > >  	mode->type = DRM_MODE_TYPE_DRIVER;
> > >  
> > > -	mode->clock = pipe_config->hw.adjusted_mode.crtc_clock;
> > > +	mode->clock = hw_mode->crtc_clock;
> > >  
> > >  	drm_mode_set_name(mode);
> > >  }
> > > -- 
> > > 2.19.1
> > > 
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > 
> > -- 
> > Ville Syrjälä
> > Intel
Navare, Manasi Oct. 27, 2020, 8:58 p.m. UTC | #4
On Tue, Oct 27, 2020 at 10:54:18PM +0200, Ville Syrjälä wrote:
> On Tue, Oct 27, 2020 at 01:43:15PM -0700, Navare, Manasi wrote:
> > On Tue, Oct 27, 2020 at 10:09:20PM +0200, Ville Syrjälä wrote:
> > > On Tue, Oct 27, 2020 at 12:30:33PM -0700, Manasi Navare wrote:
> > > > No functional changes just use hw_mode to retrive
> > > > hw.adjusted_mode during HW state readout for clarity
> > > > in bigjoiner case.
> > > 
> > > Still don't understnad what this has to do with bigjoiner. Looks
> > > like a simple introduction of a strangely named local variable to
> > > me?
> > 
> > SHould I just drop this then? Or just reword the commit message to remove
> > bigjoiner related stuff?
> 
> I guess just drop it if it has no real purpose.

Yes sounds good, I think @Maarten probably changed it so its more intuitive
But I can drop this

Manasi

> 
> > 
> > Manasi
> > > 
> > > > 
> > > > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/display/intel_display.c | 22 +++++++++++---------
> > > >  1 file changed, 12 insertions(+), 10 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > > > index cabda5a02e9e..b000dd68977f 100644
> > > > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > > > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > > > @@ -9119,20 +9119,22 @@ static void intel_get_pipe_src_size(struct intel_crtc *crtc,
> > > >  void intel_mode_from_pipe_config(struct drm_display_mode *mode,
> > > >  				 struct intel_crtc_state *pipe_config)
> > > >  {
> > > > -	mode->hdisplay = pipe_config->hw.adjusted_mode.crtc_hdisplay;
> > > > -	mode->htotal = pipe_config->hw.adjusted_mode.crtc_htotal;
> > > > -	mode->hsync_start = pipe_config->hw.adjusted_mode.crtc_hsync_start;
> > > > -	mode->hsync_end = pipe_config->hw.adjusted_mode.crtc_hsync_end;
> > > > +	struct drm_display_mode *hw_mode = &pipe_config->hw.adjusted_mode;
> > > >  
> > > > -	mode->vdisplay = pipe_config->hw.adjusted_mode.crtc_vdisplay;
> > > > -	mode->vtotal = pipe_config->hw.adjusted_mode.crtc_vtotal;
> > > > -	mode->vsync_start = pipe_config->hw.adjusted_mode.crtc_vsync_start;
> > > > -	mode->vsync_end = pipe_config->hw.adjusted_mode.crtc_vsync_end;
> > > > +	mode->hdisplay = hw_mode->crtc_hdisplay;
> > > > +	mode->htotal = hw_mode->crtc_htotal;
> > > > +	mode->hsync_start = hw_mode->crtc_hsync_start;
> > > > +	mode->hsync_end = hw_mode->crtc_hsync_end;
> > > >  
> > > > -	mode->flags = pipe_config->hw.adjusted_mode.flags;
> > > > +	mode->vdisplay = hw_mode->crtc_vdisplay;
> > > > +	mode->vtotal = hw_mode->crtc_vtotal;
> > > > +	mode->vsync_start = hw_mode->crtc_vsync_start;
> > > > +	mode->vsync_end = hw_mode->crtc_vsync_end;
> > > > +
> > > > +	mode->flags = hw_mode->flags;
> > > >  	mode->type = DRM_MODE_TYPE_DRIVER;
> > > >  
> > > > -	mode->clock = pipe_config->hw.adjusted_mode.crtc_clock;
> > > > +	mode->clock = hw_mode->crtc_clock;
> > > >  
> > > >  	drm_mode_set_name(mode);
> > > >  }
> > > > -- 
> > > > 2.19.1
> > > > 
> > > > _______________________________________________
> > > > Intel-gfx mailing list
> > > > Intel-gfx@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > > 
> > > -- 
> > > Ville Syrjälä
> > > Intel
> 
> -- 
> Ville Syrjälä
> Intel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index cabda5a02e9e..b000dd68977f 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -9119,20 +9119,22 @@  static void intel_get_pipe_src_size(struct intel_crtc *crtc,
 void intel_mode_from_pipe_config(struct drm_display_mode *mode,
 				 struct intel_crtc_state *pipe_config)
 {
-	mode->hdisplay = pipe_config->hw.adjusted_mode.crtc_hdisplay;
-	mode->htotal = pipe_config->hw.adjusted_mode.crtc_htotal;
-	mode->hsync_start = pipe_config->hw.adjusted_mode.crtc_hsync_start;
-	mode->hsync_end = pipe_config->hw.adjusted_mode.crtc_hsync_end;
+	struct drm_display_mode *hw_mode = &pipe_config->hw.adjusted_mode;
 
-	mode->vdisplay = pipe_config->hw.adjusted_mode.crtc_vdisplay;
-	mode->vtotal = pipe_config->hw.adjusted_mode.crtc_vtotal;
-	mode->vsync_start = pipe_config->hw.adjusted_mode.crtc_vsync_start;
-	mode->vsync_end = pipe_config->hw.adjusted_mode.crtc_vsync_end;
+	mode->hdisplay = hw_mode->crtc_hdisplay;
+	mode->htotal = hw_mode->crtc_htotal;
+	mode->hsync_start = hw_mode->crtc_hsync_start;
+	mode->hsync_end = hw_mode->crtc_hsync_end;
 
-	mode->flags = pipe_config->hw.adjusted_mode.flags;
+	mode->vdisplay = hw_mode->crtc_vdisplay;
+	mode->vtotal = hw_mode->crtc_vtotal;
+	mode->vsync_start = hw_mode->crtc_vsync_start;
+	mode->vsync_end = hw_mode->crtc_vsync_end;
+
+	mode->flags = hw_mode->flags;
 	mode->type = DRM_MODE_TYPE_DRIVER;
 
-	mode->clock = pipe_config->hw.adjusted_mode.crtc_clock;
+	mode->clock = hw_mode->crtc_clock;
 
 	drm_mode_set_name(mode);
 }