Skip to content

Commit 64a3da3

Browse files
The-goingigorpecovnik
authored andcommitted
sunxi-6.16: move drm-sun4i-Mark-one-of-the-UI-planes-as-a-cursor-one.patch
This patch breaks the cursor display.
1 parent 2279308 commit 64a3da3

10 files changed

+53
-128
lines changed

patch/kernel/archive/sunxi-6.16/patches.drm/drm-sun4i-de2-Initialize-layer-fields-earlier.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Reviewed-by: Chen-Yu Tsai <[email protected]>
1717
2 files changed, 10 insertions(+), 8 deletions(-)
1818

1919
diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
20-
index fd25316a6d65..3840242dfaf3 100644
20+
index aa987bca1dbb..cb9b694fef10 100644
2121
--- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
2222
+++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
2323
@@ -295,6 +295,11 @@ struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
@@ -29,10 +29,10 @@ index fd25316a6d65..3840242dfaf3 100644
2929
+ layer->channel = channel;
3030
+ layer->overlay = 0;
3131
+
32-
/* possible crtcs are set later */
33-
ret = drm_universal_plane_init(drm, &layer->plane, 0,
34-
&sun8i_ui_layer_funcs,
35-
@@ -322,10 +327,6 @@ struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
32+
if (index == 0)
33+
type = DRM_PLANE_TYPE_PRIMARY;
34+
35+
@@ -325,10 +330,6 @@ struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
3636
}
3737

3838
drm_plane_helper_add(&layer->plane, &sun8i_ui_layer_helper_funcs);

patch/kernel/archive/sunxi-6.16/patches.drm/drm-sun4i-de2-de3-add-mixer-version-enum.patch

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From b49e4fb3439c50eb6effc559366b3e88e2ac2f27 Mon Sep 17 00:00:00 2001
1+
From 90f292bafa6d6198248b7349cd9945a1258ceaac Mon Sep 17 00:00:00 2001
22
From: Jernej Skrabec <[email protected]>
33
Date: Sun, 29 Sep 2024 22:04:45 +1300
44
Subject: drm: sun4i: de2/de3: add mixer version enum
@@ -35,10 +35,10 @@ index e12a81fa9108..2d5a2cf7cba2 100644
3535
fmt_type, encoding, range);
3636
return;
3737
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
38-
index fb5348388eb5..c38ea430a149 100644
38+
index 1b498568e7df..35b1f3d50504 100644
3939
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
4040
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
41-
@@ -629,7 +629,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
41+
@@ -624,7 +624,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
4242

4343
if (!mixer->hw_preconfigured) {
4444
/* Reset registers and disable unused sub-engines */
@@ -47,87 +47,87 @@ index fb5348388eb5..c38ea430a149 100644
4747
for (i = 0; i < DE3_MIXER_UNIT_SIZE; i += 4)
4848
regmap_write(mixer->engine.regs, i, 0);
4949

50-
@@ -732,6 +732,7 @@ static void sun8i_mixer_remove(struct platform_device *pdev)
50+
@@ -727,6 +727,7 @@ static void sun8i_mixer_remove(struct platform_device *pdev)
5151

5252
static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = {
5353
.ccsc = CCSC_MIXER0_LAYOUT,
5454
+ .de_type = sun8i_mixer_de2,
5555
.scaler_mask = 0xf,
5656
.scanline_yuv = 2048,
5757
.ui_num = 3,
58-
@@ -740,6 +741,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = {
58+
@@ -735,6 +736,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = {
5959

6060
static const struct sun8i_mixer_cfg sun8i_a83t_mixer1_cfg = {
6161
.ccsc = CCSC_MIXER1_LAYOUT,
6262
+ .de_type = sun8i_mixer_de2,
6363
.scaler_mask = 0x3,
6464
.scanline_yuv = 2048,
6565
.ui_num = 1,
66-
@@ -748,6 +750,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer1_cfg = {
66+
@@ -743,6 +745,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer1_cfg = {
6767

6868
static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
6969
.ccsc = CCSC_MIXER0_LAYOUT,
7070
+ .de_type = sun8i_mixer_de2,
7171
.mod_rate = 432000000,
7272
.scaler_mask = 0xf,
7373
.scanline_yuv = 2048,
74-
@@ -757,6 +760,7 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
74+
@@ -752,6 +755,7 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
7575

7676
static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
7777
.ccsc = CCSC_MIXER0_LAYOUT,
7878
+ .de_type = sun8i_mixer_de2,
7979
.mod_rate = 297000000,
8080
.scaler_mask = 0xf,
8181
.scanline_yuv = 2048,
82-
@@ -766,6 +770,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
82+
@@ -761,6 +765,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
8383

8484
static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
8585
.ccsc = CCSC_MIXER1_LAYOUT,
8686
+ .de_type = sun8i_mixer_de2,
8787
.mod_rate = 297000000,
8888
.scaler_mask = 0x3,
8989
.scanline_yuv = 2048,
90-
@@ -774,6 +779,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
90+
@@ -769,6 +774,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
9191
};
9292

9393
static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
9494
+ .de_type = sun8i_mixer_de2,
9595
.vi_num = 2,
9696
.ui_num = 1,
9797
.scaler_mask = 0x3,
98-
@@ -784,6 +790,7 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
98+
@@ -779,6 +785,7 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
9999

100100
static const struct sun8i_mixer_cfg sun20i_d1_mixer0_cfg = {
101101
.ccsc = CCSC_D1_MIXER0_LAYOUT,
102102
+ .de_type = sun8i_mixer_de2,
103103
.mod_rate = 297000000,
104104
.scaler_mask = 0x3,
105105
.scanline_yuv = 2048,
106-
@@ -793,6 +800,7 @@ static const struct sun8i_mixer_cfg sun20i_d1_mixer0_cfg = {
106+
@@ -788,6 +795,7 @@ static const struct sun8i_mixer_cfg sun20i_d1_mixer0_cfg = {
107107

108108
static const struct sun8i_mixer_cfg sun20i_d1_mixer1_cfg = {
109109
.ccsc = CCSC_MIXER1_LAYOUT,
110110
+ .de_type = sun8i_mixer_de2,
111111
.mod_rate = 297000000,
112112
.scaler_mask = 0x1,
113113
.scanline_yuv = 1024,
114-
@@ -802,6 +810,7 @@ static const struct sun8i_mixer_cfg sun20i_d1_mixer1_cfg = {
114+
@@ -797,6 +805,7 @@ static const struct sun8i_mixer_cfg sun20i_d1_mixer1_cfg = {
115115

116116
static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = {
117117
.ccsc = CCSC_MIXER0_LAYOUT,
118118
+ .de_type = sun8i_mixer_de2,
119119
.mod_rate = 297000000,
120120
.scaler_mask = 0xf,
121121
.scanline_yuv = 4096,
122-
@@ -811,6 +820,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = {
122+
@@ -806,6 +815,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = {
123123

124124
static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
125125
.ccsc = CCSC_MIXER1_LAYOUT,
126126
+ .de_type = sun8i_mixer_de2,
127127
.mod_rate = 297000000,
128128
.scaler_mask = 0x3,
129129
.scanline_yuv = 2048,
130-
@@ -820,7 +830,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
130+
@@ -815,7 +825,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
131131

132132
static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
133133
.ccsc = CCSC_MIXER0_LAYOUT,
@@ -253,5 +253,5 @@ index 2e49a6e5f1f1..aa346c3beb30 100644
253253

254254
if (format->hsub == 1 && format->vsub == 1)
255255
--
256-
2.35.3
256+
2.51.0
257257

patch/kernel/archive/sunxi-6.16/patches.drm/drm-sun4i-de2-de3-refactor-mixer-initialisation.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 52a7d96a033601a9cee79fe217e895cfb860b872 Mon Sep 17 00:00:00 2001
1+
From 4042b1c4ed4e1cfe9170cbb57d49e13f419afa3d Mon Sep 17 00:00:00 2001
22
From: Jernej Skrabec <[email protected]>
33
Date: Sun, 29 Sep 2024 22:04:46 +1300
44
Subject: drm: sun4i: de2/de3: refactor mixer initialisation
@@ -14,10 +14,10 @@ Reviewed-by: Andre Przywara <[email protected]>
1414
1 file changed, 38 insertions(+), 32 deletions(-)
1515

1616
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
17-
index c38ea430a149..0419859a9f89 100644
17+
index 35b1f3d50504..6d26381a2f2b 100644
1818
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
1919
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
20-
@@ -503,6 +503,42 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
20+
@@ -498,6 +498,42 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
2121
return of_ep.id;
2222
}
2323

@@ -60,7 +60,7 @@ index c38ea430a149..0419859a9f89 100644
6060
static int sun8i_mixer_bind(struct device *dev, struct device *master,
6161
void *data)
6262
{
63-
@@ -511,8 +547,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
63+
@@ -506,8 +542,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
6464
struct sun4i_drv *drv = drm->dev_private;
6565
struct sun8i_mixer *mixer;
6666
void __iomem *regs;
@@ -69,7 +69,7 @@ index c38ea430a149..0419859a9f89 100644
6969
int i, ret;
7070

7171
/*
72-
@@ -625,8 +659,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
72+
@@ -620,8 +654,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
7373

7474
list_add_tail(&mixer->engine.list, &drv->engine_list);
7575

@@ -78,7 +78,7 @@ index c38ea430a149..0419859a9f89 100644
7878
if (!mixer->hw_preconfigured) {
7979
/* Reset registers and disable unused sub-engines */
8080
if (mixer->cfg->de_type == sun8i_mixer_de3) {
81-
@@ -643,7 +675,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
81+
@@ -638,7 +670,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
8282
regmap_write(mixer->engine.regs, SUN50I_MIXER_FMT_EN, 0);
8383
regmap_write(mixer->engine.regs, SUN50I_MIXER_CDC0_EN, 0);
8484
regmap_write(mixer->engine.regs, SUN50I_MIXER_CDC1_EN, 0);
@@ -87,7 +87,7 @@ index c38ea430a149..0419859a9f89 100644
8787
for (i = 0; i < DE2_MIXER_UNIT_SIZE; i += 4)
8888
regmap_write(mixer->engine.regs, i, 0);
8989

90-
@@ -656,35 +688,9 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
90+
@@ -651,35 +683,9 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
9191
regmap_write(mixer->engine.regs, SUN8I_MIXER_DCSC_EN, 0);
9292
}
9393

patch/kernel/archive/sunxi-6.16/patches.drm/drm-sun4i-de3-add-YUV-support-to-the-DE3-mixer.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 1a66bdf301ea483f5c3993fb6795bc0236bab5c1 Mon Sep 17 00:00:00 2001
1+
From 681152c96fe02df6fb36ecef2fed562511d871fe Mon Sep 17 00:00:00 2001
22
From: Jernej Skrabec <[email protected]>
33
Date: Sun, 29 Sep 2024 22:04:40 +1300
44
Subject: drm: sun4i: de3: add YUV support to the DE3 mixer
@@ -17,7 +17,7 @@ Signed-off-by: Ryan Walklin <[email protected]>
1717
2 files changed, 52 insertions(+)
1818

1919
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
20-
index 45a218121310..fb5348388eb5 100644
20+
index fe1b58004a7b..1b498568e7df 100644
2121
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
2222
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
2323
@@ -23,8 +23,11 @@
@@ -32,7 +32,7 @@ index 45a218121310..fb5348388eb5 100644
3232
#include "sun8i_mixer.h"
3333
#include "sun8i_ui_layer.h"
3434
#include "sun8i_vi_layer.h"
35-
@@ -425,12 +428,52 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
35+
@@ -420,12 +423,52 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
3636

3737
DRM_DEBUG_DRIVER("Switching display mixer interlaced mode %s\n",
3838
interlaced ? "on" : "off");
@@ -85,7 +85,7 @@ index 45a218121310..fb5348388eb5 100644
8585
};
8686

8787
static const struct regmap_config sun8i_mixer_regmap_config = {
88-
@@ -492,6 +535,10 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
88+
@@ -487,6 +530,10 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
8989
mixer->engine.ops = &sun8i_engine_ops;
9090
mixer->engine.node = dev->of_node;
9191
mixer->drv = drv;

patch/kernel/archive/sunxi-6.16/patches.drm/drm-sun4i-de3-add-formatter-flag-to-mixer-config.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 67de80fb6dce1b60822731628cba536c07fa2e10 Mon Sep 17 00:00:00 2001
1+
From 56afb6bff57f83073c83a49f6f6bccf387ab8116 Mon Sep 17 00:00:00 2001
22
From: Jernej Skrabec <[email protected]>
33
Date: Sun, 29 Sep 2024 22:04:39 +1300
44
Subject: drm: sun4i: de3: add formatter flag to mixer config
@@ -17,10 +17,10 @@ Signed-off-by: Ryan Walklin <[email protected]>
1717
2 files changed, 3 insertions(+)
1818

1919
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
20-
index 20a78d48ccdf..45a218121310 100644
20+
index fbfa7e6a25aa..fe1b58004a7b 100644
2121
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
2222
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
23-
@@ -774,6 +774,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
23+
@@ -769,6 +769,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
2424
static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
2525
.ccsc = CCSC_MIXER0_LAYOUT,
2626
.is_de3 = true,

patch/kernel/archive/sunxi-6.16/patches.drm/drm-sun4i-de33-mixer-add-Display-Engine-3.3-DE33-support.patch

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 66c111f3315d2c34c2f9bfb39de61bf3ec46a5f6 Mon Sep 17 00:00:00 2001
1+
From bbbfdc8bc71a4d5a6fb291aae3027f40dd999816 Mon Sep 17 00:00:00 2001
22
From: Jernej Skrabec <[email protected]>
33
Date: Sun, 29 Sep 2024 22:04:55 +1300
44
Subject: drm: sun4i: de33: mixer: add Display Engine 3.3 (DE33) support
@@ -26,7 +26,7 @@ Signed-off-by: Ryan Walklin <[email protected]>
2626
2 files changed, 108 insertions(+), 17 deletions(-)
2727

2828
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
29-
index a319db11cc68..bfed8a6b453f 100644
29+
index f05017443565..53143646fc1c 100644
3030
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
3131
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
3232
@@ -351,8 +351,12 @@ static void sun8i_mixer_commit(struct sunxi_engine *engine,
@@ -44,7 +44,7 @@ index a319db11cc68..bfed8a6b453f 100644
4444
}
4545

4646
static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
47-
@@ -406,25 +410,33 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
47+
@@ -401,25 +405,33 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
4848
const struct drm_display_mode *mode)
4949
{
5050
struct sun8i_mixer *mixer = engine_to_sun8i_mixer(engine);
@@ -81,7 +81,7 @@ index a319db11cc68..bfed8a6b453f 100644
8181
SUN8I_MIXER_BLEND_OUTCTL_INTERLACED, val);
8282

8383
DRM_DEBUG_DRIVER("Switching display mixer interlaced mode %s\n",
84-
@@ -435,10 +447,8 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
84+
@@ -430,10 +442,8 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
8585
else
8686
val = 0xff108080;
8787

@@ -94,7 +94,7 @@ index a319db11cc68..bfed8a6b453f 100644
9494

9595
if (mixer->cfg->has_formatter)
9696
sun50i_fmt_setup(mixer, mode->hdisplay,
97-
@@ -478,12 +488,29 @@ static const struct sunxi_engine_ops sun8i_engine_ops = {
97+
@@ -473,12 +483,29 @@ static const struct sunxi_engine_ops sun8i_engine_ops = {
9898
};
9999

100100
static const struct regmap_config sun8i_mixer_regmap_config = {
@@ -124,7 +124,7 @@ index a319db11cc68..bfed8a6b453f 100644
124124
static int sun8i_mixer_of_get_id(struct device_node *node)
125125
{
126126
struct device_node *ep, *remote;
127-
@@ -506,36 +533,48 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
127+
@@ -501,36 +528,48 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
128128

129129
static void sun8i_mixer_init(struct sun8i_mixer *mixer)
130130
{
@@ -179,7 +179,7 @@ index a319db11cc68..bfed8a6b453f 100644
179179
SUN8I_MIXER_BLEND_PIPE_CTL_EN_MSK, 0);
180180
}
181181
}
182-
@@ -618,6 +657,30 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
182+
@@ -613,6 +652,30 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
183183
return PTR_ERR(mixer->engine.regs);
184184
}
185185

@@ -210,7 +210,7 @@ index a319db11cc68..bfed8a6b453f 100644
210210
mixer->reset = devm_reset_control_get(dev, NULL);
211211
if (IS_ERR(mixer->reset)) {
212212
dev_err(dev, "Couldn't get our reset line\n");
213-
@@ -846,6 +909,18 @@ static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
213+
@@ -841,6 +904,18 @@ static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
214214
.vi_num = 1,
215215
};
216216

@@ -229,7 +229,7 @@ index a319db11cc68..bfed8a6b453f 100644
229229
static const struct of_device_id sun8i_mixer_of_table[] = {
230230
{
231231
.compatible = "allwinner,sun8i-a83t-de2-mixer-0",
232-
@@ -891,6 +966,10 @@ static const struct of_device_id sun8i_mixer_of_table[] = {
232+
@@ -886,6 +961,10 @@ static const struct of_device_id sun8i_mixer_of_table[] = {
233233
.compatible = "allwinner,sun50i-h6-de3-mixer-0",
234234
.data = &sun50i_h6_mixer0_cfg,
235235
},
@@ -301,5 +301,5 @@ index ecba096c553b..f67f4b124a19 100644
301301
else
302302
return DE2_CH_BASE + channel * DE2_CH_SIZE;
303303
--
304-
2.35.3
304+
2.51.0
305305

0 commit comments

Comments
 (0)