diff options
author | Robert Morell <rmorell@nvidia.com> | 2011-08-24 16:52:56 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:48:45 -0800 |
commit | 97d5a84a90ab41cab1c49c8a259aa84799458455 (patch) | |
tree | a1175aaa2f54966774159523e2a7416557064493 /arch | |
parent | f237f2f6f25be739efaacc254a74d1a97b942d62 (diff) |
video: tegra: Implement EDID query
This change implements the TEGRA_DC_EXT_CONTROL_GET_OUTPUT_EDID ioctl in
the dc_ext interface.
It first adds a way for the tegra dc EDID module to export EDID data
safely, without the risk of reading an incomplete or corrupted EDID in
the presence of hotplug, by moving the actual data to a substructure
with a lifetime maintained by a kref. Then, that support is plumbed
through the hdmi block (which is currently the only way to get at the
EDID) and out to userspace.
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Bug 817119
Original-Change-Id: I78cd170e15322011b428cb71ffad2c0c3ea058ac
Reviewed-on: http://git-master/r/49127
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Rebase-Id: Rafafc0a6fbacda5494b12162ad99a8c70ceeb2e0
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/dc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h index 5aac57586e70..4bce3c370bd4 100644 --- a/arch/arm/mach-tegra/include/mach/dc.h +++ b/arch/arm/mach-tegra/include/mach/dc.h @@ -499,4 +499,18 @@ void tegra_dc_config_pwm(struct tegra_dc *dc, struct tegra_dc_pwm_params *cfg); int tegra_dc_update_csc(struct tegra_dc *dc, int win_index); +/* + * In order to get a dc's current EDID, first call tegra_dc_get_edid() from an + * interruptible context. The returned value (if non-NULL) points to a + * snapshot of the current state; after copying data from it, call + * tegra_dc_put_edid() on that pointer. Do not dereference anything through + * that pointer after calling tegra_dc_put_edid(). + */ +struct tegra_dc_edid { + size_t len; + u8 buf[0]; +}; +struct tegra_dc_edid *tegra_dc_get_edid(struct tegra_dc *dc); +void tegra_dc_put_edid(struct tegra_dc_edid *edid); + #endif |