All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: hdmi: request underscan by default
@ 2014-02-24 22:20 Daniel Drake
  2014-02-25 10:33 ` Ville Syrjälä
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Drake @ 2014-02-24 22:20 UTC (permalink / raw)
  To: airlied; +Cc: mjg59, treding, dri-devel

Working with HDMI TVs is a real pain as they tend to overscan by
default, meaning that the pixels around the edge of the framebuffer
are not displayed. This is well explained here:
http://mjg59.dreamwidth.org/8705.html

There is a bit in the HDMI info frame that can request that the
remote display shows the full pixel data ("underscan"). For the
remote display, the HDMI spec states that this is optional - it
doesn't have to listen. That means that most TVs will probably ignore
this.

But, maybe there are a handful of TVs for which this would help
the situation. As we live in a digital world, ask the remote
display not to overscan by default.

Signed-off-by: Daniel Drake <drake@endlessm.com>
---
 drivers/video/hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
index 9e758a8..6c2d924 100644
--- a/drivers/video/hdmi.c
+++ b/drivers/video/hdmi.c
@@ -54,6 +54,7 @@ int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame)
 	frame->type = HDMI_INFOFRAME_TYPE_AVI;
 	frame->version = 2;
 	frame->length = HDMI_AVI_INFOFRAME_SIZE;
+	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
 
 	return 0;
 }
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: hdmi: request underscan by default
  2014-02-24 22:20 [PATCH] video: hdmi: request underscan by default Daniel Drake
@ 2014-02-25 10:33 ` Ville Syrjälä
  2014-02-25 14:56   ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjälä @ 2014-02-25 10:33 UTC (permalink / raw)
  To: Daniel Drake; +Cc: mjg59, treding, dri-devel

On Mon, Feb 24, 2014 at 04:20:04PM -0600, Daniel Drake wrote:
> Working with HDMI TVs is a real pain as they tend to overscan by
> default, meaning that the pixels around the edge of the framebuffer
> are not displayed. This is well explained here:
> http://mjg59.dreamwidth.org/8705.html
> 
> There is a bit in the HDMI info frame that can request that the
> remote display shows the full pixel data ("underscan"). For the
> remote display, the HDMI spec states that this is optional - it
> doesn't have to listen. That means that most TVs will probably ignore
> this.
> 
> But, maybe there are a handful of TVs for which this would help
> the situation. As we live in a digital world, ask the remote
> display not to overscan by default.
> 
> Signed-off-by: Daniel Drake <drake@endlessm.com>

Yeah, underscan would seem the saner default value. CEA-861 says that
the source should always set the S bits appropriately if it knows what
to put there, even if the sink claims that it won't respect those bits.
So we're not violating the spec by doing this.

I'm thinking we should also add a connector property to allow userspace
to choose the scan behaviour. Or perhaps some driver already has such a
property?

I'm not sure we want to put this into hdmi.c though. Maybe better to
avoid such policy in the infoframe code itself, and instead stick this
into drm_hdmi_avi_infoframe_from_display_mode()?

> ---
>  drivers/video/hdmi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
> index 9e758a8..6c2d924 100644
> --- a/drivers/video/hdmi.c
> +++ b/drivers/video/hdmi.c
> @@ -54,6 +54,7 @@ int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame)
>  	frame->type = HDMI_INFOFRAME_TYPE_AVI;
>  	frame->version = 2;
>  	frame->length = HDMI_AVI_INFOFRAME_SIZE;
> +	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>  
>  	return 0;
>  }
> -- 
> 1.8.3.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: hdmi: request underscan by default
  2014-02-25 10:33 ` Ville Syrjälä
@ 2014-02-25 14:56   ` Alex Deucher
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2014-02-25 14:56 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Matthew Garrett, treding, Maling list - DRI developers, Daniel Drake

On Tue, Feb 25, 2014 at 5:33 AM, Ville Syrjälä
<ville.syrjala@linux.intel.com> wrote:
> On Mon, Feb 24, 2014 at 04:20:04PM -0600, Daniel Drake wrote:
>> Working with HDMI TVs is a real pain as they tend to overscan by
>> default, meaning that the pixels around the edge of the framebuffer
>> are not displayed. This is well explained here:
>> http://mjg59.dreamwidth.org/8705.html
>>
>> There is a bit in the HDMI info frame that can request that the
>> remote display shows the full pixel data ("underscan"). For the
>> remote display, the HDMI spec states that this is optional - it
>> doesn't have to listen. That means that most TVs will probably ignore
>> this.
>>
>> But, maybe there are a handful of TVs for which this would help
>> the situation. As we live in a digital world, ask the remote
>> display not to overscan by default.
>>
>> Signed-off-by: Daniel Drake <drake@endlessm.com>
>
> Yeah, underscan would seem the saner default value. CEA-861 says that
> the source should always set the S bits appropriately if it knows what
> to put there, even if the sink claims that it won't respect those bits.
> So we're not violating the spec by doing this.
>
> I'm thinking we should also add a connector property to allow userspace
> to choose the scan behaviour. Or perhaps some driver already has such a
> property?
>

We have an underscan connector property in the radeon driver, but it
uses the scaler to underscan the image to compensate for TV's that
overscan by default, so it's not really a good match for this.

Alex

> I'm not sure we want to put this into hdmi.c though. Maybe better to
> avoid such policy in the infoframe code itself, and instead stick this
> into drm_hdmi_avi_infoframe_from_display_mode()?
>
>> ---
>>  drivers/video/hdmi.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
>> index 9e758a8..6c2d924 100644
>> --- a/drivers/video/hdmi.c
>> +++ b/drivers/video/hdmi.c
>> @@ -54,6 +54,7 @@ int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame)
>>       frame->type = HDMI_INFOFRAME_TYPE_AVI;
>>       frame->version = 2;
>>       frame->length = HDMI_AVI_INFOFRAME_SIZE;
>> +     frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>>
>>       return 0;
>>  }
>> --
>> 1.8.3.2
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Ville Syrjälä
> Intel OTC
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-25 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-24 22:20 [PATCH] video: hdmi: request underscan by default Daniel Drake
2014-02-25 10:33 ` Ville Syrjälä
2014-02-25 14:56   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.