On Fri, 2022-09-30 at 11:39 +0300, Laurent Pinchart wrote: > From: Kieran Bingham <kieran.bingham@xxxxxxxxxxxxxxxx> > > The LCDIF includes a color space converter that supports YUV input. > Use > it to support YUV planes, either through the converter if the output > format is RGB, or in conversion bypass mode otherwise. > > Signed-off-by: Kieran Bingham <kieran.bingham@xxxxxxxxxxxxxxxx> > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> > Reviewed-by: Marek Vasut <marex@xxxxxxx> > Reviewed-by: Kieran Bingham <kieran.bingham@xxxxxxxxxxxxxxxx> > --- > Changes since v3: > > - Add YCbCr to RGB conversion formula in a comment > - Fix small typo in comment > > Changes since v2: > > - Fix YUV to RGB coefficients > - List floating point coefficient values in comment > - Express CSC coefficients with three hex digits > - Move | to the end of the line > - Add comment header before RGB formats > > Changes since v1: > > - Support all YCbCr encodings and quantization ranges > - Drop incorrect comment > --- > drivers/gpu/drm/mxsfb/lcdif_kms.c | 267 ++++++++++++++++++++++++--- > -- > drivers/gpu/drm/mxsfb/lcdif_regs.h | 5 +- > 2 files changed, 231 insertions(+), 41 deletions(-) Although modetest shows wrong display image for YUV framebuffers due to the pre-existing bug that Laurent claims, I choose to trust Laurent, so: Reviewed-by: Liu Ying <victor.liu@xxxxxxx> Thanks Laurent and Kieran for the work.