Re: [PATCH 08/12] gpu: host1x: Port the HDMI vendor infoframe code the common helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 14, 2013 at 12:17:24AM +0100, Damien Lespiau wrote:
> I just wrote the bits to define and pack HDMI vendor specific infoframe.
> Port the host1x driver to use those so I can refactor the infoframe code
> a bit more.
> 
> Cc: Thierry Reding <thierry.reding@xxxxxxxxx>
> Cc: Terje Bergström <tbergstrom@xxxxxxxxxx>
> Cc: linux-tegra@xxxxxxxxxxxxxxx
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
> ---
>  drivers/gpu/host1x/drm/hdmi.c | 24 ++++--------------------
>  1 file changed, 4 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c
> index 01097da..b548918 100644
> --- a/drivers/gpu/host1x/drm/hdmi.c
> +++ b/drivers/gpu/host1x/drm/hdmi.c
> @@ -539,7 +539,7 @@ static void tegra_hdmi_setup_audio_infoframe(struct tegra_hdmi *hdmi)
>  
>  static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi)
>  {
> -	struct hdmi_vendor_infoframe frame;
> +	struct hdmi_hdmi_infoframe frame;
>  	unsigned long value;
>  	u8 buffer[10];
>  	ssize_t err;
> @@ -551,26 +551,10 @@ static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi)
>  		return;
>  	}
>  
> -	memset(&frame, 0, sizeof(frame));
> +	hdmi_hdmi_infoframe_init(&frame);
> +	frame.s3d_struct = HDMI_3D_STRUCTURE_FRAME_PACKING;
>  
> -	frame.type = HDMI_INFOFRAME_TYPE_VENDOR;
> -	frame.version = 0x01;
> -	frame.length = 6;

This changes the length of the infoframe from 6 to 5, which is enough
for "frame packing", but maybe the commit msg should still mention that
small detail.

> -
> -	frame.data[0] = 0x03; /* regid0 */
> -	frame.data[1] = 0x0c; /* regid1 */
> -	frame.data[2] = 0x00; /* regid2 */
> -	frame.data[3] = 0x02 << 5; /* video format */
> -
> -	/* TODO: 74 MHz limit? */
> -	if (1) {
> -		frame.data[4] = 0x00 << 4; /* 3D structure */
> -	} else {
> -		frame.data[4] = 0x08 << 4; /* 3D structure */
> -		frame.data[5] = 0x00 << 4; /* 3D ext. data */
> -	}
> -
> -	err = hdmi_vendor_infoframe_pack(&frame, buffer, sizeof(buffer));
> +	err = hdmi_hdmi_infoframe_pack(&frame, buffer, sizeof(buffer));
>  	if (err < 0) {
>  		dev_err(hdmi->dev, "failed to pack vendor infoframe: %zd\n",
>  			err);
> -- 
> 1.8.3.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux