Commit 333ab43
drm/mediatek: ovl: Add blend_modes to driver data
OVL_CON_CLRFMT_MAN is a configuration for extending color format
settings of DISP_REG_OVL_CON(n).
It will change some of the original color format settings.
Take the settings of (3 << 12) for example.
- If OVL_CON_CLRFMT_MAN = 0 means OVL_CON_CLRFMT_RGBA8888.
- If OVL_CON_CLRFMT_MAN = 1 means OVL_CON_CLRFMT_PARGB8888.
Since previous SoCs did not support OVL_CON_CLRFMT_MAN, this means
that the SoC does not support the premultiplied color format.
It will break the original color format setting of MT8173.
Therefore, the blend_modes is added to the driver data and then
mtk_ovl_fmt_convert() will check the blend_modes to see if
pre-multiplied is supported in the current platform.
If it is not supported, use coverage mode to set it to the supported
color formats to solve the degradation problem.
Fixes: a3f7f7e ("drm/mediatek: Support "Pre-multiplied" blending in OVL")
Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20241009034646.13143-5-jason-jh.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>1 parent 41607c3 commit 333ab43
1 file changed
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
389 | | - | |
390 | | - | |
| 390 | + | |
| 391 | + | |
391 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
392 | 411 | | |
393 | 412 | | |
394 | 413 | | |
| |||
466 | 485 | | |
467 | 486 | | |
468 | 487 | | |
469 | | - | |
| 488 | + | |
470 | 489 | | |
471 | 490 | | |
472 | 491 | | |
| |||
664 | 683 | | |
665 | 684 | | |
666 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
667 | 689 | | |
668 | 690 | | |
669 | 691 | | |
| |||
674 | 696 | | |
675 | 697 | | |
676 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
677 | 702 | | |
678 | 703 | | |
679 | 704 | | |
| |||
685 | 710 | | |
686 | 711 | | |
687 | 712 | | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
688 | 716 | | |
689 | 717 | | |
690 | 718 | | |
| |||
0 commit comments