[Intel-gfx] [PATCH 6/9] drm/i915: Add a small adjustment to the pixel counter on interlaced modes
sourab gupta
sourabgupta at gmail.com
Fri May 16 04:42:30 CEST 2014
On Thu, May 15, 2014 at 8:23 PM, akash goel <akash.goels at gmail.com> wrote:
> Reviewed the patch & it looks good.
> Just to confirm, this patch tries to address the case of a tiny window of
> transition, i.e. from the 1st field (last half line) to 2nd field (first
> half line).
>
> Reviewed-by: "Akash Goel <akash.goels at gmail.com>"
>
>
> Reviewed the patch and looks fine. You can add my r-b tag:
Reviewed-by: "Sourab Gupta <sourabgupta at gmail.com>"
On Tue, Apr 29, 2014 at 4:05 PM, <ville.syrjala at linux.intel.com> wrote:
>
>> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>>
>> In interlaced modes, the pixel counter counts all pixels,
>> so one field will have htotal more pixels. In order to avoid
>> the reported position from jumping backwards when the pixel
>> counter is beyond the length of the shorter field, just
>> clamp the position the length of the shorter field. This
>> matches how the scanline counter based position works since
>> the scanline counter doesn't count the two half lines.
>>
>> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_irq.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_irq.c
>> b/drivers/gpu/drm/i915/i915_irq.c
>> index 7e0d577..64cd888 100644
>> --- a/drivers/gpu/drm/i915/i915_irq.c
>> +++ b/drivers/gpu/drm/i915/i915_irq.c
>> @@ -844,6 +844,18 @@ static int i915_get_crtc_scanoutpos(struct
>> drm_device *dev, int pipe,
>> vtotal *= htotal;
>>
>> /*
>> + * In interlaced modes, the pixel counter counts all
>> pixels,
>> + * so one field will have htotal more pixels. In order to
>> avoid
>> + * the reported position from jumping backwards when the
>> pixel
>> + * counter is beyond the length of the shorter field, just
>> + * clamp the position the length of the shorter field.
>> This
>> + * matches how the scanline counter based position works
>> since
>> + * the scanline counter doesn't count the two half lines.
>> + */
>> + if (position >= vtotal)
>> + position = vtotal - 1;
>> +
>> + /*
>> * Start of vblank interrupt is triggered at start of
>> hsync,
>> * just prior to the first active line of vblank. However
>> we
>> * consider lines to start at the leading edge of
>> horizontal
>> --
>> 1.8.3.2
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140516/6fff62e7/attachment.html>
More information about the Intel-gfx
mailing list