Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm: rp1: dpi: Add support for MEDIA_BUS_FMT_RGB565_1X24_CPADHI #6132

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,14 @@ static u32 set_output_format(u32 bus_format, u32 *shift, u32 *imask, u32 *rgbsz)
*shift |= OSHIFT_RGB(29, 19, 9);
return OMASK_RGB(0x3fc, 0x3fc, 0x3fc);

case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
/* This should match Raspberry Pi legacy "mode 3" */
*shift |= OSHIFT_RGB(26, 17, 6);
*rgbsz &= DPI_DMA_RGBSZ_BPP_MASK;
return OMASK_RGB(0x3e0, 0x3f0, 0x3e0);

default:
/* RGB666_1x24_CPADHI, BGR666_1X24_CPADHI and "RGB565_666" formats */
/* RGB666_1x24_CPADHI, BGR666_1X24_CPADHI and "mode 4" formats */
*shift |= OSHIFT_RGB(27, 17, 7);
*rgbsz &= DPI_DMA_RGBSZ_BPP_MASK;
return OMASK_RGB(0x3f0, 0x3f0, 0x3f0);
Expand Down