mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
drm/rockchip: vop: add rb_swap check for serial rgb format
Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Change-Id: I5394e22e58eac87f9ee1a8fdee1cc576970d5a87
This commit is contained in:
parent
52afd66cc1
commit
61ff18b478
|
|
@ -663,6 +663,19 @@ static bool is_uv_swap(uint32_t bus_format, uint32_t output_mode)
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool is_rb_swap(uint32_t bus_format, uint32_t output_mode)
|
||||
{
|
||||
/*
|
||||
* The default component order of serial rgb3x8 formats
|
||||
* is BGR. So it is needed to enable RB swap.
|
||||
*/
|
||||
if (bus_format == MEDIA_BUS_FMT_RGB888_3X8 ||
|
||||
bus_format == MEDIA_BUS_FMT_RGB888_DUMMY_4X8)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool is_yc_swap(uint32_t bus_format)
|
||||
{
|
||||
switch (bus_format) {
|
||||
|
|
@ -3144,7 +3157,8 @@ static void vop_update_csc(struct drm_crtc *crtc)
|
|||
s->output_if & VOP_OUTPUT_IF_BT656))
|
||||
s->output_mode = ROCKCHIP_OUT_MODE_P888;
|
||||
|
||||
if (is_uv_swap(s->bus_format, s->output_mode))
|
||||
if (is_uv_swap(s->bus_format, s->output_mode) ||
|
||||
is_rb_swap(s->bus_format, s->output_mode))
|
||||
VOP_CTRL_SET(vop, dsp_rb_swap, 1);
|
||||
else
|
||||
VOP_CTRL_SET(vop, dsp_data_swap, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user