mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
sunxi-6.16: move drm-sun4i-Mark-one-of-the-UI-planes-as-a-cursor-one.patch
This patch breaks the cursor display.
This commit is contained in:
@@ -17,7 +17,7 @@ Reviewed-by: Chen-Yu Tsai <wens@csie.org>
|
||||
2 files changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
||||
index fd25316a6d65..3840242dfaf3 100644
|
||||
index aa987bca1dbb..cb9b694fef10 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
||||
@@ -295,6 +295,11 @@ struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
|
||||
@@ -29,10 +29,10 @@ index fd25316a6d65..3840242dfaf3 100644
|
||||
+ layer->channel = channel;
|
||||
+ layer->overlay = 0;
|
||||
+
|
||||
/* possible crtcs are set later */
|
||||
ret = drm_universal_plane_init(drm, &layer->plane, 0,
|
||||
&sun8i_ui_layer_funcs,
|
||||
@@ -322,10 +327,6 @@ struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
|
||||
if (index == 0)
|
||||
type = DRM_PLANE_TYPE_PRIMARY;
|
||||
|
||||
@@ -325,10 +330,6 @@ struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
|
||||
}
|
||||
|
||||
drm_plane_helper_add(&layer->plane, &sun8i_ui_layer_helper_funcs);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b49e4fb3439c50eb6effc559366b3e88e2ac2f27 Mon Sep 17 00:00:00 2001
|
||||
From 90f292bafa6d6198248b7349cd9945a1258ceaac Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||
Date: Sun, 29 Sep 2024 22:04:45 +1300
|
||||
Subject: drm: sun4i: de2/de3: add mixer version enum
|
||||
@@ -35,10 +35,10 @@ index e12a81fa9108..2d5a2cf7cba2 100644
|
||||
fmt_type, encoding, range);
|
||||
return;
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
index fb5348388eb5..c38ea430a149 100644
|
||||
index 1b498568e7df..35b1f3d50504 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
@@ -629,7 +629,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -624,7 +624,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
|
||||
if (!mixer->hw_preconfigured) {
|
||||
/* Reset registers and disable unused sub-engines */
|
||||
@@ -47,7 +47,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
for (i = 0; i < DE3_MIXER_UNIT_SIZE; i += 4)
|
||||
regmap_write(mixer->engine.regs, i, 0);
|
||||
|
||||
@@ -732,6 +732,7 @@ static void sun8i_mixer_remove(struct platform_device *pdev)
|
||||
@@ -727,6 +727,7 @@ static void sun8i_mixer_remove(struct platform_device *pdev)
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = {
|
||||
.ccsc = CCSC_MIXER0_LAYOUT,
|
||||
@@ -55,7 +55,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.scaler_mask = 0xf,
|
||||
.scanline_yuv = 2048,
|
||||
.ui_num = 3,
|
||||
@@ -740,6 +741,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = {
|
||||
@@ -735,6 +736,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_a83t_mixer1_cfg = {
|
||||
.ccsc = CCSC_MIXER1_LAYOUT,
|
||||
@@ -63,7 +63,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.scaler_mask = 0x3,
|
||||
.scanline_yuv = 2048,
|
||||
.ui_num = 1,
|
||||
@@ -748,6 +750,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer1_cfg = {
|
||||
@@ -743,6 +745,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer1_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
|
||||
.ccsc = CCSC_MIXER0_LAYOUT,
|
||||
@@ -71,7 +71,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.mod_rate = 432000000,
|
||||
.scaler_mask = 0xf,
|
||||
.scanline_yuv = 2048,
|
||||
@@ -757,6 +760,7 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
|
||||
@@ -752,6 +755,7 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
|
||||
.ccsc = CCSC_MIXER0_LAYOUT,
|
||||
@@ -79,7 +79,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.mod_rate = 297000000,
|
||||
.scaler_mask = 0xf,
|
||||
.scanline_yuv = 2048,
|
||||
@@ -766,6 +770,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
|
||||
@@ -761,6 +765,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
|
||||
.ccsc = CCSC_MIXER1_LAYOUT,
|
||||
@@ -87,7 +87,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.mod_rate = 297000000,
|
||||
.scaler_mask = 0x3,
|
||||
.scanline_yuv = 2048,
|
||||
@@ -774,6 +779,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
|
||||
@@ -769,6 +774,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
|
||||
};
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
|
||||
@@ -95,7 +95,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.vi_num = 2,
|
||||
.ui_num = 1,
|
||||
.scaler_mask = 0x3,
|
||||
@@ -784,6 +790,7 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
|
||||
@@ -779,6 +785,7 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun20i_d1_mixer0_cfg = {
|
||||
.ccsc = CCSC_D1_MIXER0_LAYOUT,
|
||||
@@ -103,7 +103,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.mod_rate = 297000000,
|
||||
.scaler_mask = 0x3,
|
||||
.scanline_yuv = 2048,
|
||||
@@ -793,6 +800,7 @@ static const struct sun8i_mixer_cfg sun20i_d1_mixer0_cfg = {
|
||||
@@ -788,6 +795,7 @@ static const struct sun8i_mixer_cfg sun20i_d1_mixer0_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun20i_d1_mixer1_cfg = {
|
||||
.ccsc = CCSC_MIXER1_LAYOUT,
|
||||
@@ -111,7 +111,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.mod_rate = 297000000,
|
||||
.scaler_mask = 0x1,
|
||||
.scanline_yuv = 1024,
|
||||
@@ -802,6 +810,7 @@ static const struct sun8i_mixer_cfg sun20i_d1_mixer1_cfg = {
|
||||
@@ -797,6 +805,7 @@ static const struct sun8i_mixer_cfg sun20i_d1_mixer1_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = {
|
||||
.ccsc = CCSC_MIXER0_LAYOUT,
|
||||
@@ -119,7 +119,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.mod_rate = 297000000,
|
||||
.scaler_mask = 0xf,
|
||||
.scanline_yuv = 4096,
|
||||
@@ -811,6 +820,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = {
|
||||
@@ -806,6 +815,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
|
||||
.ccsc = CCSC_MIXER1_LAYOUT,
|
||||
@@ -127,7 +127,7 @@ index fb5348388eb5..c38ea430a149 100644
|
||||
.mod_rate = 297000000,
|
||||
.scaler_mask = 0x3,
|
||||
.scanline_yuv = 2048,
|
||||
@@ -820,7 +830,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
|
||||
@@ -815,7 +825,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
|
||||
|
||||
static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
|
||||
.ccsc = CCSC_MIXER0_LAYOUT,
|
||||
@@ -253,5 +253,5 @@ index 2e49a6e5f1f1..aa346c3beb30 100644
|
||||
|
||||
if (format->hsub == 1 && format->vsub == 1)
|
||||
--
|
||||
2.35.3
|
||||
2.51.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 52a7d96a033601a9cee79fe217e895cfb860b872 Mon Sep 17 00:00:00 2001
|
||||
From 4042b1c4ed4e1cfe9170cbb57d49e13f419afa3d Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||
Date: Sun, 29 Sep 2024 22:04:46 +1300
|
||||
Subject: drm: sun4i: de2/de3: refactor mixer initialisation
|
||||
@@ -14,10 +14,10 @@ Reviewed-by: Andre Przywara <andre.przywara@arm.com>
|
||||
1 file changed, 38 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
index c38ea430a149..0419859a9f89 100644
|
||||
index 35b1f3d50504..6d26381a2f2b 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
@@ -503,6 +503,42 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
|
||||
@@ -498,6 +498,42 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
|
||||
return of_ep.id;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ index c38ea430a149..0419859a9f89 100644
|
||||
static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
void *data)
|
||||
{
|
||||
@@ -511,8 +547,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -506,8 +542,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
struct sun4i_drv *drv = drm->dev_private;
|
||||
struct sun8i_mixer *mixer;
|
||||
void __iomem *regs;
|
||||
@@ -69,7 +69,7 @@ index c38ea430a149..0419859a9f89 100644
|
||||
int i, ret;
|
||||
|
||||
/*
|
||||
@@ -625,8 +659,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -620,8 +654,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
|
||||
list_add_tail(&mixer->engine.list, &drv->engine_list);
|
||||
|
||||
@@ -78,7 +78,7 @@ index c38ea430a149..0419859a9f89 100644
|
||||
if (!mixer->hw_preconfigured) {
|
||||
/* Reset registers and disable unused sub-engines */
|
||||
if (mixer->cfg->de_type == sun8i_mixer_de3) {
|
||||
@@ -643,7 +675,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -638,7 +670,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
regmap_write(mixer->engine.regs, SUN50I_MIXER_FMT_EN, 0);
|
||||
regmap_write(mixer->engine.regs, SUN50I_MIXER_CDC0_EN, 0);
|
||||
regmap_write(mixer->engine.regs, SUN50I_MIXER_CDC1_EN, 0);
|
||||
@@ -87,7 +87,7 @@ index c38ea430a149..0419859a9f89 100644
|
||||
for (i = 0; i < DE2_MIXER_UNIT_SIZE; i += 4)
|
||||
regmap_write(mixer->engine.regs, i, 0);
|
||||
|
||||
@@ -656,35 +688,9 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -651,35 +683,9 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
regmap_write(mixer->engine.regs, SUN8I_MIXER_DCSC_EN, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 1a66bdf301ea483f5c3993fb6795bc0236bab5c1 Mon Sep 17 00:00:00 2001
|
||||
From 681152c96fe02df6fb36ecef2fed562511d871fe Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||
Date: Sun, 29 Sep 2024 22:04:40 +1300
|
||||
Subject: drm: sun4i: de3: add YUV support to the DE3 mixer
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Ryan Walklin <ryan@testtoast.com>
|
||||
2 files changed, 52 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
index 45a218121310..fb5348388eb5 100644
|
||||
index fe1b58004a7b..1b498568e7df 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
@@ -23,8 +23,11 @@
|
||||
@@ -32,7 +32,7 @@ index 45a218121310..fb5348388eb5 100644
|
||||
#include "sun8i_mixer.h"
|
||||
#include "sun8i_ui_layer.h"
|
||||
#include "sun8i_vi_layer.h"
|
||||
@@ -425,12 +428,52 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
|
||||
@@ -420,12 +423,52 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
|
||||
|
||||
DRM_DEBUG_DRIVER("Switching display mixer interlaced mode %s\n",
|
||||
interlaced ? "on" : "off");
|
||||
@@ -85,7 +85,7 @@ index 45a218121310..fb5348388eb5 100644
|
||||
};
|
||||
|
||||
static const struct regmap_config sun8i_mixer_regmap_config = {
|
||||
@@ -492,6 +535,10 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -487,6 +530,10 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
mixer->engine.ops = &sun8i_engine_ops;
|
||||
mixer->engine.node = dev->of_node;
|
||||
mixer->drv = drv;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 67de80fb6dce1b60822731628cba536c07fa2e10 Mon Sep 17 00:00:00 2001
|
||||
From 56afb6bff57f83073c83a49f6f6bccf387ab8116 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||
Date: Sun, 29 Sep 2024 22:04:39 +1300
|
||||
Subject: drm: sun4i: de3: add formatter flag to mixer config
|
||||
@@ -17,10 +17,10 @@ Signed-off-by: Ryan Walklin <ryan@testtoast.com>
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
index 20a78d48ccdf..45a218121310 100644
|
||||
index fbfa7e6a25aa..fe1b58004a7b 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
@@ -774,6 +774,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
|
||||
@@ -769,6 +769,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
|
||||
static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
|
||||
.ccsc = CCSC_MIXER0_LAYOUT,
|
||||
.is_de3 = true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 66c111f3315d2c34c2f9bfb39de61bf3ec46a5f6 Mon Sep 17 00:00:00 2001
|
||||
From bbbfdc8bc71a4d5a6fb291aae3027f40dd999816 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||
Date: Sun, 29 Sep 2024 22:04:55 +1300
|
||||
Subject: drm: sun4i: de33: mixer: add Display Engine 3.3 (DE33) support
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: Ryan Walklin <ryan@testtoast.com>
|
||||
2 files changed, 108 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
index a319db11cc68..bfed8a6b453f 100644
|
||||
index f05017443565..53143646fc1c 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
@@ -351,8 +351,12 @@ static void sun8i_mixer_commit(struct sunxi_engine *engine,
|
||||
@@ -44,7 +44,7 @@ index a319db11cc68..bfed8a6b453f 100644
|
||||
}
|
||||
|
||||
static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
|
||||
@@ -406,25 +410,33 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
|
||||
@@ -401,25 +405,33 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
struct sun8i_mixer *mixer = engine_to_sun8i_mixer(engine);
|
||||
@@ -81,7 +81,7 @@ index a319db11cc68..bfed8a6b453f 100644
|
||||
SUN8I_MIXER_BLEND_OUTCTL_INTERLACED, val);
|
||||
|
||||
DRM_DEBUG_DRIVER("Switching display mixer interlaced mode %s\n",
|
||||
@@ -435,10 +447,8 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
|
||||
@@ -430,10 +442,8 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
|
||||
else
|
||||
val = 0xff108080;
|
||||
|
||||
@@ -94,7 +94,7 @@ index a319db11cc68..bfed8a6b453f 100644
|
||||
|
||||
if (mixer->cfg->has_formatter)
|
||||
sun50i_fmt_setup(mixer, mode->hdisplay,
|
||||
@@ -478,12 +488,29 @@ static const struct sunxi_engine_ops sun8i_engine_ops = {
|
||||
@@ -473,12 +483,29 @@ static const struct sunxi_engine_ops sun8i_engine_ops = {
|
||||
};
|
||||
|
||||
static const struct regmap_config sun8i_mixer_regmap_config = {
|
||||
@@ -124,7 +124,7 @@ index a319db11cc68..bfed8a6b453f 100644
|
||||
static int sun8i_mixer_of_get_id(struct device_node *node)
|
||||
{
|
||||
struct device_node *ep, *remote;
|
||||
@@ -506,36 +533,48 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
|
||||
@@ -501,36 +528,48 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
|
||||
|
||||
static void sun8i_mixer_init(struct sun8i_mixer *mixer)
|
||||
{
|
||||
@@ -179,7 +179,7 @@ index a319db11cc68..bfed8a6b453f 100644
|
||||
SUN8I_MIXER_BLEND_PIPE_CTL_EN_MSK, 0);
|
||||
}
|
||||
}
|
||||
@@ -618,6 +657,30 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -613,6 +652,30 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
return PTR_ERR(mixer->engine.regs);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ index a319db11cc68..bfed8a6b453f 100644
|
||||
mixer->reset = devm_reset_control_get(dev, NULL);
|
||||
if (IS_ERR(mixer->reset)) {
|
||||
dev_err(dev, "Couldn't get our reset line\n");
|
||||
@@ -846,6 +909,18 @@ static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
|
||||
@@ -841,6 +904,18 @@ static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
|
||||
.vi_num = 1,
|
||||
};
|
||||
|
||||
@@ -229,7 +229,7 @@ index a319db11cc68..bfed8a6b453f 100644
|
||||
static const struct of_device_id sun8i_mixer_of_table[] = {
|
||||
{
|
||||
.compatible = "allwinner,sun8i-a83t-de2-mixer-0",
|
||||
@@ -891,6 +966,10 @@ static const struct of_device_id sun8i_mixer_of_table[] = {
|
||||
@@ -886,6 +961,10 @@ static const struct of_device_id sun8i_mixer_of_table[] = {
|
||||
.compatible = "allwinner,sun50i-h6-de3-mixer-0",
|
||||
.data = &sun50i_h6_mixer0_cfg,
|
||||
},
|
||||
@@ -301,5 +301,5 @@ index ecba096c553b..f67f4b124a19 100644
|
||||
else
|
||||
return DE2_CH_BASE + channel * DE2_CH_SIZE;
|
||||
--
|
||||
2.35.3
|
||||
2.51.0
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
From 87f663d4a99c45d9d7bd6260f8544be7c7364b1a Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megi@xff.cz>
|
||||
Date: Mon, 31 Oct 2022 03:23:11 +0100
|
||||
Subject: drm/sun4i: Mark one of the UI planes as a cursor one
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||||
---
|
||||
drivers/gpu/drm/sun4i/sun8i_mixer.c | 7 ++++++-
|
||||
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 7 ++-----
|
||||
drivers/gpu/drm/sun4i/sun8i_ui_layer.h | 4 +++-
|
||||
3 files changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
index 8b41d33baa30..03dd180a4c31 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
@@ -349,8 +349,13 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
|
||||
|
||||
for (i = 0; i < mixer->cfg->ui_num; i++) {
|
||||
struct sun8i_layer *layer;
|
||||
+ enum drm_plane_type type = DRM_PLANE_TYPE_OVERLAY;
|
||||
+ if (i == 0)
|
||||
+ type = DRM_PLANE_TYPE_PRIMARY;
|
||||
+ else if (i == (mixer->cfg->ui_num - 1))
|
||||
+ type = DRM_PLANE_TYPE_CURSOR;
|
||||
|
||||
- layer = sun8i_ui_layer_init_one(drm, mixer, i);
|
||||
+ layer = sun8i_ui_layer_init_one(drm, mixer, i, type);
|
||||
if (IS_ERR(layer)) {
|
||||
dev_err(drm->dev, "Couldn't initialize %s plane\n",
|
||||
i ? "overlay" : "primary");
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
||||
index b90e5edef4e8..0349e8bdffd6 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
||||
@@ -277,9 +277,9 @@ static const uint64_t sun8i_layer_modifiers[] = {
|
||||
|
||||
struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
|
||||
struct sun8i_mixer *mixer,
|
||||
- int index)
|
||||
+ int index,
|
||||
+ enum drm_plane_type type)
|
||||
{
|
||||
- enum drm_plane_type type = DRM_PLANE_TYPE_OVERLAY;
|
||||
int channel = mixer->cfg->vi_num + index;
|
||||
struct sun8i_layer *layer;
|
||||
unsigned int plane_cnt;
|
||||
@@ -289,9 +289,6 @@ struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
|
||||
if (!layer)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
- if (index == 0)
|
||||
- type = DRM_PLANE_TYPE_PRIMARY;
|
||||
-
|
||||
/* possible crtcs are set later */
|
||||
ret = drm_universal_plane_init(drm, &layer->plane, 0,
|
||||
&sun8i_ui_layer_funcs,
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.h b/drivers/gpu/drm/sun4i/sun8i_ui_layer.h
|
||||
index 83892f6ff211..d4530e9f64e0 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.h
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.h
|
||||
@@ -51,5 +51,7 @@ struct sun8i_layer;
|
||||
|
||||
struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
|
||||
struct sun8i_mixer *mixer,
|
||||
- int index);
|
||||
+ int index,
|
||||
+ enum drm_plane_type type);
|
||||
+
|
||||
#endif /* _SUN8I_UI_LAYER_H_ */
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0ac8b16c56a18c7649bc15ac15785b0144b23988 Mon Sep 17 00:00:00 2001
|
||||
From 169ec4104890f77b3ed761bd92934ce91906d03c Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megi@xff.cz>
|
||||
Date: Sun, 30 Apr 2023 18:19:16 +0200
|
||||
Subject: drm/sun4i: Support taking over display pipeline state from p-boot
|
||||
@@ -303,7 +303,7 @@ index f1ddefe0f554..958c2997ab43 100644
|
||||
|
||||
static inline struct sun6i_dsi *host_to_sun6i_dsi(struct mipi_dsi_host *host)
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
index 03dd180a4c31..20a78d48ccdf 100644
|
||||
index 8b41d33baa30..fbfa7e6a25aa 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -357,7 +357,7 @@ index 03dd180a4c31..20a78d48ccdf 100644
|
||||
DRM_DEBUG_DRIVER("Committing changes\n");
|
||||
|
||||
drm_for_each_plane(plane, state->dev) {
|
||||
@@ -461,6 +491,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -456,6 +486,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
dev_set_drvdata(dev, mixer);
|
||||
mixer->engine.ops = &sun8i_engine_ops;
|
||||
mixer->engine.node = dev->of_node;
|
||||
@@ -365,7 +365,7 @@ index 03dd180a4c31..20a78d48ccdf 100644
|
||||
|
||||
if (of_property_present(dev->of_node, "iommus")) {
|
||||
/*
|
||||
@@ -485,6 +516,11 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -480,6 +511,11 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
*/
|
||||
mixer->engine.id = sun8i_mixer_of_get_id(dev->of_node);
|
||||
|
||||
@@ -377,7 +377,7 @@ index 03dd180a4c31..20a78d48ccdf 100644
|
||||
mixer->cfg = of_device_get_match_data(dev);
|
||||
if (!mixer->cfg)
|
||||
return -EINVAL;
|
||||
@@ -532,8 +568,11 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -527,8 +563,11 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
* reason for the mixer to be functional. Make sure it's the
|
||||
* case.
|
||||
*/
|
||||
@@ -389,7 +389,7 @@ index 03dd180a4c31..20a78d48ccdf 100644
|
||||
|
||||
clk_prepare_enable(mixer->mod_clk);
|
||||
|
||||
@@ -541,6 +580,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -536,6 +575,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
|
||||
base = sun8i_blender_base(mixer);
|
||||
|
||||
@@ -397,7 +397,7 @@ index 03dd180a4c31..20a78d48ccdf 100644
|
||||
/* Reset registers and disable unused sub-engines */
|
||||
if (mixer->cfg->is_de3) {
|
||||
for (i = 0; i < DE3_MIXER_UNIT_SIZE; i += 4)
|
||||
@@ -572,6 +612,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -567,6 +607,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
/* Enable the mixer */
|
||||
regmap_write(mixer->engine.regs, SUN8I_MIXER_GLOBAL_CTL,
|
||||
SUN8I_MIXER_GLOBAL_CTL_RT_EN);
|
||||
@@ -405,7 +405,7 @@ index 03dd180a4c31..20a78d48ccdf 100644
|
||||
|
||||
/* Set background color to black */
|
||||
regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_BKCOLOR(base),
|
||||
@@ -592,8 +633,10 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
@@ -587,8 +628,10 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
|
||||
SUN8I_MIXER_BLEND_MODE(base, i),
|
||||
SUN8I_MIXER_BLEND_MODE_DEF);
|
||||
|
||||
@@ -416,7 +416,7 @@ index 03dd180a4c31..20a78d48ccdf 100644
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -623,6 +666,15 @@ static const struct component_ops sun8i_mixer_ops = {
|
||||
@@ -618,6 +661,15 @@ static const struct component_ops sun8i_mixer_ops = {
|
||||
|
||||
static int sun8i_mixer_probe(struct platform_device *pdev)
|
||||
{
|
||||
|
||||
@@ -175,7 +175,6 @@
|
||||
patches.megous/media-ov5648-Fix-call-to-pm_runtime_set_suspended.patch
|
||||
patches.megous/arm64-dts-rk3399-Add-dmc_opp_table.patch
|
||||
patches.megous/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch
|
||||
patches.megous/drm-sun4i-Mark-one-of-the-UI-planes-as-a-cursor-one.patch
|
||||
patches.megous/drm-sun4i-Implement-gamma-correction.patch
|
||||
patches.megous/drm-panel-st7703-Fix-xbd599-timings-to-make-refresh-rate-exactl.patch
|
||||
patches.megous/drm-sun4i-Support-taking-over-display-pipeline-state-from-p-boo.patch
|
||||
|
||||
@@ -174,7 +174,6 @@
|
||||
patches.megous/media-ov5648-Fix-call-to-pm_runtime_set_suspended.patch
|
||||
patches.megous/arm64-dts-rk3399-Add-dmc_opp_table.patch
|
||||
patches.megous/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch
|
||||
patches.megous/drm-sun4i-Mark-one-of-the-UI-planes-as-a-cursor-one.patch
|
||||
patches.megous/drm-sun4i-Implement-gamma-correction.patch
|
||||
patches.megous/drm-panel-st7703-Fix-xbd599-timings-to-make-refresh-rate-exactl.patch
|
||||
patches.megous/drm-sun4i-Support-taking-over-display-pipeline-state-from-p-boo.patch
|
||||
|
||||
Reference in New Issue
Block a user