aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/drm.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-01-29 20:31:17 +0100
committerThierry Reding <treding@nvidia.com>2014-06-05 23:09:16 +0200
commitf925390efccb24016a4fafe77721770021ed754a (patch)
treeeb338c23ebcc4d51553ba75003c94b89d35bcec5 /drivers/gpu/drm/tegra/drm.h
parentdrm/tegra: Cleanup header file (diff)
downloadlinux-dev-f925390efccb24016a4fafe77721770021ed754a.tar.xz
linux-dev-f925390efccb24016a4fafe77721770021ed754a.zip
drm/tegra: dc - Add YUYV support
YUYV is UYVY with swapped bytes. Luckily the Tegra DC hardware can swap bytes during scan-out, so supporting YUYV is simply a matter of writing the correct value to the byteswap register. This patch modifies tegra_dc_format() to return the byte swap parameter via an output parameter in addition to returning the pixel format. Many other formats can potentially be supported in a similar way. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.h')
-rw-r--r--drivers/gpu/drm/tegra/drm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index 597aa829af1f..302bfee83f0a 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -156,6 +156,7 @@ struct tegra_dc_window {
} dst;
unsigned int bits_per_pixel;
unsigned int format;
+ unsigned int swap;
unsigned int stride[2];
unsigned long base[3];
bool bottom_up;
@@ -163,7 +164,7 @@ struct tegra_dc_window {
};
/* from dc.c */
-unsigned int tegra_dc_format(uint32_t format);
+unsigned int tegra_dc_format(uint32_t format, unsigned int *swap);
int tegra_dc_setup_window(struct tegra_dc *dc, unsigned int index,
const struct tegra_dc_window *window);
void tegra_dc_enable_vblank(struct tegra_dc *dc);