All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Chris Kohn <ckohn@xilinx.com>
Subject: [RFC] I2C slave encoders .set_config() rework
Date: Tue, 10 Mar 2015 01:33:21 +0200	[thread overview]
Message-ID: <2169093.XIupDoNeOl@avalon> (raw)

Hello,

I recently ran into a need to configure the colour space conversion (CSC) 
matrix of the ADV7511 HDMI transmitter based on display controller particular 
needs.

To give a bit of background regarding the use case, the ADV7511 is connected 
to an FPGA using a 16-bit bus. The only RGB formats supported by the AV7511 
(RGB 12:12:12, 10:10:10 or 8:8:8) can't thus be transported, and YUV 4:2:2 is 
used instead. The display controller in the FPGA uses an RGB to YUV conversion 
with fixed coefficients to convert the RGB frames to YUV. When RGB needs to be 
sent on the HDMI link (for instance because the connected doesn't support YUV 
natively) the ADV7511 CSC must be enabled with inverse coefficients to avoid 
colour issues.

The upstream adv7511 driver, implemented as a DRM I2C slave encoder, currently 
uses fixed hardcoded CSC coefficients. The slave encoder API has a 
.set_config() operation that could be used to configure the CSC coefficients 
by the display controller (this is the solution currently implemented in the 
vendor kernel shipped to customers). However, the operation takes a 
configuration structure that is driver-specific. This would thus require 
making the display controller aware of the ADV7511. Given that the display 
controller isn't tied to a particular HDMI encoder (or even to an HDMI encoder 
at all) this obviously can't scale.

I thus believe we should start standardizing CSC configuration. It wouldn't be 
difficult to add a new slave encoder operation to set CSC coefficients, but 
this might not be the best solution possible. Before I give it a go, I'd like 
to ask and hopefully receive feedback on the idea.

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

                 reply	other threads:[~2015-03-10  7:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2169093.XIupDoNeOl@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=ckohn@xilinx.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.