drm/i915/vbt: Fix the timing parameters
diff mbox series

Message ID 20200124125829.16973-1-vandita.kulkarni@intel.com
State New
Headers show
Series
  • drm/i915/vbt: Fix the timing parameters
Related show

Commit Message

Vandita Kulkarni Jan. 24, 2020, 12:58 p.m. UTC
Fix htotal and vtotal parameters derived from
DTD block of VBT.

Fixes: 33ef6d4fd8df ("drm/i915/vbt: Handle generic DTD block")
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jani Nikula Jan. 24, 2020, 2:23 p.m. UTC | #1
On Fri, 24 Jan 2020, Vandita Kulkarni <vandita.kulkarni@intel.com> wrote:
> Fix htotal and vtotal parameters derived from
> DTD block of VBT.
>
> Fixes: 33ef6d4fd8df ("drm/i915/vbt: Handle generic DTD block")
> Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 1e675aa55938..942a073d5768 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -366,14 +366,16 @@ parse_generic_dtd(struct drm_i915_private *dev_priv,
>  		panel_fixed_mode->hdisplay + dtd->hfront_porch;
>  	panel_fixed_mode->hsync_end =
>  		panel_fixed_mode->hsync_start + dtd->hsync;
> -	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
> +	panel_fixed_mode->htotal =
> +		panel_fixed_mode->hdisplay + dtd->hblank;
>  
>  	panel_fixed_mode->vdisplay = dtd->vactive;
>  	panel_fixed_mode->vsync_start =
>  		panel_fixed_mode->vdisplay + dtd->vfront_porch;
>  	panel_fixed_mode->vsync_end =
>  		panel_fixed_mode->vsync_start + dtd->vsync;
> -	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
> +	panel_fixed_mode->vtotal =
> +		panel_fixed_mode->vdisplay + dtd->vblank;
>  
>  	panel_fixed_mode->clock = dtd->pixel_clock;
>  	panel_fixed_mode->width_mm = dtd->width_mm;
Jani Nikula Jan. 27, 2020, 9:59 a.m. UTC | #2
On Fri, 24 Jan 2020, Jani Nikula <jani.nikula@intel.com> wrote:
> On Fri, 24 Jan 2020, Vandita Kulkarni <vandita.kulkarni@intel.com> wrote:
>> Fix htotal and vtotal parameters derived from
>> DTD block of VBT.
>>
>> Fixes: 33ef6d4fd8df ("drm/i915/vbt: Handle generic DTD block")
>> Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

And pushed, thanks for the patch. Amended the commit message to explain
that the total values were missing the back porch size.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_bios.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
>> index 1e675aa55938..942a073d5768 100644
>> --- a/drivers/gpu/drm/i915/display/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
>> @@ -366,14 +366,16 @@ parse_generic_dtd(struct drm_i915_private *dev_priv,
>>  		panel_fixed_mode->hdisplay + dtd->hfront_porch;
>>  	panel_fixed_mode->hsync_end =
>>  		panel_fixed_mode->hsync_start + dtd->hsync;
>> -	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
>> +	panel_fixed_mode->htotal =
>> +		panel_fixed_mode->hdisplay + dtd->hblank;
>>  
>>  	panel_fixed_mode->vdisplay = dtd->vactive;
>>  	panel_fixed_mode->vsync_start =
>>  		panel_fixed_mode->vdisplay + dtd->vfront_porch;
>>  	panel_fixed_mode->vsync_end =
>>  		panel_fixed_mode->vsync_start + dtd->vsync;
>> -	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
>> +	panel_fixed_mode->vtotal =
>> +		panel_fixed_mode->vdisplay + dtd->vblank;
>>  
>>  	panel_fixed_mode->clock = dtd->pixel_clock;
>>  	panel_fixed_mode->width_mm = dtd->width_mm;

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 1e675aa55938..942a073d5768 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -366,14 +366,16 @@  parse_generic_dtd(struct drm_i915_private *dev_priv,
 		panel_fixed_mode->hdisplay + dtd->hfront_porch;
 	panel_fixed_mode->hsync_end =
 		panel_fixed_mode->hsync_start + dtd->hsync;
-	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
+	panel_fixed_mode->htotal =
+		panel_fixed_mode->hdisplay + dtd->hblank;
 
 	panel_fixed_mode->vdisplay = dtd->vactive;
 	panel_fixed_mode->vsync_start =
 		panel_fixed_mode->vdisplay + dtd->vfront_porch;
 	panel_fixed_mode->vsync_end =
 		panel_fixed_mode->vsync_start + dtd->vsync;
-	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
+	panel_fixed_mode->vtotal =
+		panel_fixed_mode->vdisplay + dtd->vblank;
 
 	panel_fixed_mode->clock = dtd->pixel_clock;
 	panel_fixed_mode->width_mm = dtd->width_mm;