diff for duplicates of <05abf54038b2fb066c64d0975ca2fe06e8c5be7f.camel@mediatek.com> diff --git a/N1/2.bin b/N1/2.bin new file mode 100644 index 0000000..a48581a --- /dev/null +++ b/N1/2.bin @@ -0,0 +1,106 @@ +<html><body><p> +<pre> +On Wed, 2025-04-09 at 15:13 +0200, AngeloGioacchino Del Regno wrote: +> External email : Please do not click links or open attachments until you have verified the sender or the content. +>  +>  +> In preparation for adding support for additional color formats, +> add local helpers to map media bus format parameters to this +> driver's bit_num, channel_swap and color_format. +>  +> This commit brings no functional changes. + +Reviewed-by: CK Hu <ck.hu@mediatek.com> + +>  +> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> +> --- +>  drivers/gpu/drm/mediatek/mtk_dpi.c | 46 ++++++++++++++++++++++++++---- +>  1 file changed, 40 insertions(+), 6 deletions(-) +>  +> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c +> index d735398e97f8..5a66dfe3ad40 100644 +> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c +> @@ -738,6 +738,43 @@ static u32 *mtk_dpi_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge, +>         return input_fmts; +>  } +>  +> +static unsigned int mtk_dpi_bus_fmt_bit_num(unsigned int out_bus_format) +> +{ +> +       switch (out_bus_format) { +> +       default: +> +       case MEDIA_BUS_FMT_RGB888_1X24: +> +       case MEDIA_BUS_FMT_RGB888_2X12_LE: +> +       case MEDIA_BUS_FMT_RGB888_2X12_BE: +> +       case MEDIA_BUS_FMT_YUYV8_1X16: +> +               return MTK_DPI_OUT_BIT_NUM_8BITS; +> +       } +> +} +> + +> +static unsigned int mtk_dpi_bus_fmt_channel_swap(unsigned int out_bus_format) +> +{ +> +       switch (out_bus_format) { +> +       default: +> +       case MEDIA_BUS_FMT_RGB888_1X24: +> +       case MEDIA_BUS_FMT_RGB888_2X12_LE: +> +       case MEDIA_BUS_FMT_RGB888_2X12_BE: +> +       case MEDIA_BUS_FMT_YUYV8_1X16: +> +               return MTK_DPI_OUT_CHANNEL_SWAP_RGB; +> +       } +> +} +> + +> +static unsigned int mtk_dpi_bus_fmt_color_format(unsigned int out_bus_format) +> +{ +> +       switch (out_bus_format) { +> +       default: +> +       case MEDIA_BUS_FMT_RGB888_1X24: +> +       case MEDIA_BUS_FMT_RGB888_2X12_LE: +> +       case MEDIA_BUS_FMT_RGB888_2X12_BE: +> +               return MTK_DPI_COLOR_FORMAT_RGB; +> +       case MEDIA_BUS_FMT_YUYV8_1X16: +> +               return MTK_DPI_COLOR_FORMAT_YCBCR_422; +> +       } +> +} +> + +>  static int mtk_dpi_bridge_atomic_check(struct drm_bridge *bridge, +>                                        struct drm_bridge_state *bridge_state, +>                                        struct drm_crtc_state *crtc_state, +> @@ -757,13 +794,10 @@ static int mtk_dpi_bridge_atomic_check(struct drm_bridge *bridge, +>                 bridge_state->output_bus_cfg.format); +>  +>         dpi->output_fmt = out_bus_format; +> -       dpi->bit_num = MTK_DPI_OUT_BIT_NUM_8BITS; +> -       dpi->channel_swap = MTK_DPI_OUT_CHANNEL_SWAP_RGB; +> +       dpi->bit_num = mtk_dpi_bus_fmt_bit_num(out_bus_format); +> +       dpi->channel_swap = mtk_dpi_bus_fmt_channel_swap(out_bus_format); +>         dpi->yc_map = MTK_DPI_OUT_YC_MAP_RGB; +> -       if (out_bus_format == MEDIA_BUS_FMT_YUYV8_1X16) +> -               dpi->color_format = MTK_DPI_COLOR_FORMAT_YCBCR_422; +> -       else +> -               dpi->color_format = MTK_DPI_COLOR_FORMAT_RGB; +> +       dpi->color_format = mtk_dpi_bus_fmt_color_format(out_bus_format); +>  +>         return 0; +>  } +> -- +> 2.49.0 +>  + + +</pre> +</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice + ******************** +The information contained in this e-mail message (including any +attachments) may be confidential, proprietary, privileged, or otherwise +exempt from disclosure under applicable laws. It is intended to be +conveyed only to the designated recipient(s). Any use, dissemination, +distribution, printing, retaining or copying of this e-mail (including its +attachments) by unintended recipient(s) is strictly prohibited and may +be unlawful. If you are not an intended recipient of this e-mail, or believe + +that you have received this e-mail in error, please notify the sender +immediately (by replying to this e-mail), delete any and all copies of +this e-mail (including any attachments) from your system, and do not +disclose the content of this e-mail to any other person. Thank you! +</pre><!--}--> diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..da1f671 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,3 @@ +Content-Type: text/html; + charset="utf-8" +Content-Transfer-Encoding: base64 diff --git a/a/content_digest b/N1/content_digest index e63ec3c..074835f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -18,7 +18,7 @@ matthias.bgg@gmail.com <matthias.bgg@gmail.com> linux-mediatek@lists.infradead.org <linux-mediatek@lists.infradead.org> " kernel@collabora.com <kernel@collabora.com>\0" - "\00:1\0" + "\01:1\0" "b\0" "On Wed, 2025-04-09 at 15:13 +0200, AngeloGioacchino Del Regno wrote:\n" "> External email : Please do not click links or open attachments until you have verified the sender or the content.\n" @@ -106,5 +106,113 @@ "> --\n" "> 2.49.0\n" > + "\01:2\0" + "b\0" + "<html><body><p>\r\n" + "<pre>\r\n" + "On Wed, 2025-04-09 at 15:13 +0200, AngeloGioacchino Del Regno wrote:\r\n" + "> External email : Please do not click links or open attachments until you have verified the sender or the content.\r\n" + "> \r\n" + "> \r\n" + "> In preparation for adding support for additional color formats,\r\n" + "> add local helpers to map media bus format parameters to this\r\n" + "> driver's bit_num, channel_swap and color_format.\r\n" + "> \r\n" + "> This commit brings no functional changes.\r\n" + "\r\n" + "Reviewed-by: CK Hu <ck.hu@mediatek.com>\r\n" + "\r\n" + "> \r\n" + "> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>\r\n" + "> ---\r\n" + ">  drivers/gpu/drm/mediatek/mtk_dpi.c | 46 ++++++++++++++++++++++++++----\r\n" + ">  1 file changed, 40 insertions(+), 6 deletions(-)\r\n" + "> \r\n" + "> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c\r\n" + "> index d735398e97f8..5a66dfe3ad40 100644\r\n" + "> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c\r\n" + "> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c\r\n" + "> @@ -738,6 +738,43 @@ static u32 *mtk_dpi_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,\r\n" + ">         return input_fmts;\r\n" + ">  }\r\n" + "> \r\n" + "> +static unsigned int mtk_dpi_bus_fmt_bit_num(unsigned int out_bus_format)\r\n" + "> +{\r\n" + "> +       switch (out_bus_format) {\r\n" + "> +       default:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_1X24:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_2X12_LE:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_2X12_BE:\r\n" + "> +       case MEDIA_BUS_FMT_YUYV8_1X16:\r\n" + "> +               return MTK_DPI_OUT_BIT_NUM_8BITS;\r\n" + "> +       }\r\n" + "> +}\r\n" + "> +\r\n" + "> +static unsigned int mtk_dpi_bus_fmt_channel_swap(unsigned int out_bus_format)\r\n" + "> +{\r\n" + "> +       switch (out_bus_format) {\r\n" + "> +       default:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_1X24:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_2X12_LE:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_2X12_BE:\r\n" + "> +       case MEDIA_BUS_FMT_YUYV8_1X16:\r\n" + "> +               return MTK_DPI_OUT_CHANNEL_SWAP_RGB;\r\n" + "> +       }\r\n" + "> +}\r\n" + "> +\r\n" + "> +static unsigned int mtk_dpi_bus_fmt_color_format(unsigned int out_bus_format)\r\n" + "> +{\r\n" + "> +       switch (out_bus_format) {\r\n" + "> +       default:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_1X24:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_2X12_LE:\r\n" + "> +       case MEDIA_BUS_FMT_RGB888_2X12_BE:\r\n" + "> +               return MTK_DPI_COLOR_FORMAT_RGB;\r\n" + "> +       case MEDIA_BUS_FMT_YUYV8_1X16:\r\n" + "> +               return MTK_DPI_COLOR_FORMAT_YCBCR_422;\r\n" + "> +       }\r\n" + "> +}\r\n" + "> +\r\n" + ">  static int mtk_dpi_bridge_atomic_check(struct drm_bridge *bridge,\r\n" + ">                                        struct drm_bridge_state *bridge_state,\r\n" + ">                                        struct drm_crtc_state *crtc_state,\r\n" + "> @@ -757,13 +794,10 @@ static int mtk_dpi_bridge_atomic_check(struct drm_bridge *bridge,\r\n" + ">                 bridge_state->output_bus_cfg.format);\r\n" + "> \r\n" + ">         dpi->output_fmt = out_bus_format;\r\n" + "> -       dpi->bit_num = MTK_DPI_OUT_BIT_NUM_8BITS;\r\n" + "> -       dpi->channel_swap = MTK_DPI_OUT_CHANNEL_SWAP_RGB;\r\n" + "> +       dpi->bit_num = mtk_dpi_bus_fmt_bit_num(out_bus_format);\r\n" + "> +       dpi->channel_swap = mtk_dpi_bus_fmt_channel_swap(out_bus_format);\r\n" + ">         dpi->yc_map = MTK_DPI_OUT_YC_MAP_RGB;\r\n" + "> -       if (out_bus_format == MEDIA_BUS_FMT_YUYV8_1X16)\r\n" + "> -               dpi->color_format = MTK_DPI_COLOR_FORMAT_YCBCR_422;\r\n" + "> -       else\r\n" + "> -               dpi->color_format = MTK_DPI_COLOR_FORMAT_RGB;\r\n" + "> +       dpi->color_format = mtk_dpi_bus_fmt_color_format(out_bus_format);\r\n" + "> \r\n" + ">         return 0;\r\n" + ">  }\r\n" + "> --\r\n" + "> 2.49.0\r\n" + "> \r\n" + "\r\n" + "\r\n" + "</pre>\r\n" + "</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice\r\n" + " ********************\r\n" + "The information contained in this e-mail message (including any \r\n" + "attachments) may be confidential, proprietary, privileged, or otherwise\r\n" + "exempt from disclosure under applicable laws. It is intended to be \r\n" + "conveyed only to the designated recipient(s). Any use, dissemination, \r\n" + "distribution, printing, retaining or copying of this e-mail (including its \r\n" + "attachments) by unintended recipient(s) is strictly prohibited and may \r\n" + "be unlawful. If you are not an intended recipient of this e-mail, or believe\r\n" + " \r\n" + "that you have received this e-mail in error, please notify the sender \r\n" + "immediately (by replying to this e-mail), delete any and all copies of \r\n" + "this e-mail (including any attachments) from your system, and do not\r\n" + "disclose the content of this e-mail to any other person. Thank you!\r\n" + </pre><!--}--> -bd817b45d8199442b8d7b7407d9d2ed9be9e41ac9c4282b1de6bc9c6c7177311 +3114d4ec66c95bdacbbfeb65c19cd5a289334779eaf3b3d655712af685f8a12b
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.