* [PATCH v4 0/5] drm/sun4i: update DE33 support
@ 2026-11-19 17:54 Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 1/5] drm/sun4i: Reject fractional source coordinates without scaler Jernej Skrabec
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Jernej Skrabec @ 2026-11-19 17:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Samuel Holland
Cc: mripard, maarten.lankhorst, tzimmermann, airlied, simona, robh,
krzk+dt, conor+dt, Andre Przywara, dri-devel, devicetree,
linux-arm-kernel, linux-sunxi, linux-kernel
This is second series out of three which aims at properly introducing
support for H616 Display Engine 3.3. Previous series [1] reorganized
driver so proper DE33 support can be easily implemented.
H616 DE33 support was actually introduced a while back, but it was done
without fully understanding hardware design. Issue with existing binding
is that it considers planes as resource which is hardwired to each mixer
as it was done on older Display Engine generations (DE3 and lower). That
is not the case anymore. This series introduces new driver for planes
management, which allows doing proper plane assignments.
Note that this series intentionally breaks existing H616 DE33 mixer
binding, which was released in v6.17. Old binding can't describe shared
planes, so second mixer can't be supported with it, and it never had any
user - there is no H616 Display Engine node in upstream DT, rest of H616
display pipeline is not upstream yet and no other known DT consumer
implements it. Reasons are documented in patch 4 and driver prints error
asking to update DT if old binding is detected (patch 5).
Patches 1-4 from v3 were already applied (clk patches to sunxi
clk-for-7.5, CSC and VI format patches to drm-misc-next). Plane driver
depends at runtime on commit 63a29fbb4ecd ("clk: sunxi-ng: de2: Export
register regmap for DE33") from sunxi tree, otherwise it defers probe.
Remaining patches, which introduce all the missing bits to fully support
display pipeline on H616 SoC, will be sent once this series is merged.
WIP patches, which can be used for testing purposes, can be found at [2].
Please take a look.
Best regards,
Jernej
Changes since v3:
- dropped already applied patches 1-4
- new patch 1: reject fractional source coordinates on channels
without scaler (suggested by Chen-Yu)
- patch 3: mention in commit message that driver is hooked up only in
last patch, update copyright year, drop unused of_graph.h include,
use dev_err_probe() and MAX_DISP bound, collected Chen-Yu's R-b
- patch 4: collected Chen-Yu's and Rob's R-b
- patch 5: fix include order, use device_is_bound() under device lock,
guard put_device() in error path, drop stale @map kernel-doc, rename
planes platform device variable, mention missing scaling in commit
message, collected Chen-Yu's R-b
Link to v3: https://lore.kernel.org/linux-sunxi/20261115061102.229680-1-jernej.skrabec@gmail.com/
Link to v2: https://lore.kernel.org/linux-sunxi/20260509190015.79086-1-jernej.skrabec@siol.net/
Link to v1: https://lore.kernel.org/linux-sunxi/20251115141347.13087-1-jernej.skrabec@gmail.com/
[1] https://lore.kernel.org/linux-sunxi/20251104180942.61538-1-jernej.skrabec@gmail.com/T/#t
[2] https://github.com/jernejsk/linux-1/commits/sun4i-drm-refactor/
Jernej Skrabec (5):
drm/sun4i: Reject fractional source coordinates without scaler
dt-bindings: display: allwinner: Add DE33 planes
drm/sun4i: Add DE33 shared plane driver
dt-bindings: display: allwinner: Split H616 DE33 layer reg space
drm/sun4i: Switch DE33 to split plane bindings
.../allwinner,sun50i-h616-de33-planes.yaml | 46 ++++
.../allwinner,sun8i-a83t-de2-mixer.yaml | 16 +-
drivers/gpu/drm/sun4i/Makefile | 3 +-
drivers/gpu/drm/sun4i/sun50i_planes.c | 209 ++++++++++++++++++
drivers/gpu/drm/sun4i/sun50i_planes.h | 43 ++++
drivers/gpu/drm/sun4i/sun8i_mixer.c | 191 +++++++++++-----
drivers/gpu/drm/sun4i/sun8i_mixer.h | 11 +-
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 24 +-
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 24 +-
9 files changed, 486 insertions(+), 81 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/allwinner,sun50i-h616-de33-planes.yaml
create mode 100644 drivers/gpu/drm/sun4i/sun50i_planes.c
create mode 100644 drivers/gpu/drm/sun4i/sun50i_planes.h
base-commit: 8e2afcd2b57990465f132367fd8fdc2e55c1adad
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 1/5] drm/sun4i: Reject fractional source coordinates without scaler
2026-11-19 17:54 [PATCH v4 0/5] drm/sun4i: update DE33 support Jernej Skrabec
@ 2026-11-19 17:54 ` Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 2/5] dt-bindings: display: allwinner: Add DE33 planes Jernej Skrabec
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jernej Skrabec @ 2026-11-19 17:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Samuel Holland
Cc: mripard, maarten.lankhorst, tzimmermann, airlied, simona, robh,
krzk+dt, conor+dt, Andre Przywara, dri-devel, devicetree,
linux-arm-kernel, linux-sunxi, linux-kernel
The layer code programs the scaler whenever the source rectangle has a
fractional offset, since only the scaler can apply a sub-pixel phase.
drm_atomic_helper_check_plane_state() with DRM_PLANE_NO_SCALING doesn't
catch that: it only compares the scaling factor, which may still be
exactly 1.0 with fractional source coordinates.
Channels without a scaler would thus have the non-existent scaler
programmed instead of an error being returned. Reject fractional source
coordinates on such channels.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 24 ++++++++++++++++++++----
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 24 ++++++++++++++++++++----
2 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
index cf66f676824e..f9c7f28f9fa2 100644
--- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
+++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
@@ -179,10 +179,26 @@ static int sun8i_ui_layer_atomic_check(struct drm_plane *plane,
max_scale = SUN8I_UI_SCALER_SCALE_MAX;
}
- return drm_atomic_helper_check_plane_state(new_plane_state,
- crtc_state,
- min_scale, max_scale,
- true, true);
+ ret = drm_atomic_helper_check_plane_state(new_plane_state,
+ crtc_state,
+ min_scale, max_scale,
+ true, true);
+ if (ret)
+ return ret;
+
+ /*
+ * Fractional source coordinates can only be handled by the scaler,
+ * so reject them on channels without one.
+ */
+ if (new_plane_state->visible &&
+ !(layer->cfg->scaler_mask & BIT(layer->channel)) &&
+ ((new_plane_state->src.x1 | new_plane_state->src.y1 |
+ new_plane_state->src.x2 | new_plane_state->src.y2) & 0xffff)) {
+ DRM_DEBUG_DRIVER("Fractional source coordinates need scaler\n");
+ return -EINVAL;
+ }
+
+ return 0;
}
diff --git a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c
index 09d94f7f9977..4d3fc03f9877 100644
--- a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c
+++ b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c
@@ -259,10 +259,26 @@ static int sun8i_vi_layer_atomic_check(struct drm_plane *plane,
max_scale = SUN8I_VI_SCALER_SCALE_MAX;
}
- return drm_atomic_helper_check_plane_state(new_plane_state,
- crtc_state,
- min_scale, max_scale,
- true, true);
+ ret = drm_atomic_helper_check_plane_state(new_plane_state,
+ crtc_state,
+ min_scale, max_scale,
+ true, true);
+ if (ret)
+ return ret;
+
+ /*
+ * Fractional source coordinates can only be handled by the scaler,
+ * so reject them on channels without one.
+ */
+ if (new_plane_state->visible &&
+ !(layer->cfg->scaler_mask & BIT(layer->channel)) &&
+ ((new_plane_state->src.x1 | new_plane_state->src.y1 |
+ new_plane_state->src.x2 | new_plane_state->src.y2) & 0xffff)) {
+ DRM_DEBUG_DRIVER("Fractional source coordinates need scaler\n");
+ return -EINVAL;
+ }
+
+ return 0;
}
static void sun8i_vi_layer_atomic_update(struct drm_plane *plane,
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 2/5] dt-bindings: display: allwinner: Add DE33 planes
2026-11-19 17:54 [PATCH v4 0/5] drm/sun4i: update DE33 support Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 1/5] drm/sun4i: Reject fractional source coordinates without scaler Jernej Skrabec
@ 2026-11-19 17:54 ` Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 3/5] drm/sun4i: Add DE33 shared plane driver Jernej Skrabec
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jernej Skrabec @ 2026-11-19 17:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Samuel Holland
Cc: mripard, maarten.lankhorst, tzimmermann, airlied, simona, robh,
krzk+dt, conor+dt, Andre Przywara, dri-devel, devicetree,
linux-arm-kernel, linux-sunxi, linux-kernel, Krzysztof Kozlowski
Allwinner Display Engine 3.3 contains planes, which are shared resources
between all mixers present in SoC. They can be assigned to specific
mixer by using registers which reside in display clocks MMIO.
Add a binding for them.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
.../allwinner,sun50i-h616-de33-planes.yaml | 46 +++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/allwinner,sun50i-h616-de33-planes.yaml
diff --git a/Documentation/devicetree/bindings/display/allwinner,sun50i-h616-de33-planes.yaml b/Documentation/devicetree/bindings/display/allwinner,sun50i-h616-de33-planes.yaml
new file mode 100644
index 000000000000..0a07cb8a5f79
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/allwinner,sun50i-h616-de33-planes.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/allwinner,sun50i-h616-de33-planes.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner H616 Display Engine 3.3 planes
+
+maintainers:
+ - Jernej Skrabec <jernej.skrabec@gmail.com>
+
+description:
+ Display Engine 3.3 planes are independent of mixers, contrary to
+ previous generations of Display Engine. Planes can be assigned to
+ mixers independently and even dynamically during runtime.
+
+properties:
+ compatible:
+ enum:
+ - allwinner,sun50i-h616-de33-planes
+
+ reg:
+ maxItems: 1
+
+ allwinner,plane-mapping:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle of the device responsible for assigning (mapping) planes
+ between mixers.
+
+required:
+ - compatible
+ - reg
+ - allwinner,plane-mapping
+
+additionalProperties: false
+
+examples:
+ - |
+ planes: planes@100000 {
+ compatible = "allwinner,sun50i-h616-de33-planes";
+ reg = <0x100000 0x180000>;
+ allwinner,plane-mapping = <&display_clocks>;
+ };
+
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 3/5] drm/sun4i: Add DE33 shared plane driver
2026-11-19 17:54 [PATCH v4 0/5] drm/sun4i: update DE33 support Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 1/5] drm/sun4i: Reject fractional source coordinates without scaler Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 2/5] dt-bindings: display: allwinner: Add DE33 planes Jernej Skrabec
@ 2026-11-19 17:54 ` Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 4/5] dt-bindings: display: allwinner: Split H616 DE33 layer reg space Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 5/5] drm/sun4i: Switch DE33 to split plane bindings Jernej Skrabec
4 siblings, 0 replies; 6+ messages in thread
From: Jernej Skrabec @ 2026-11-19 17:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Samuel Holland
Cc: mripard, maarten.lankhorst, tzimmermann, airlied, simona, robh,
krzk+dt, conor+dt, Andre Przywara, dri-devel, devicetree,
linux-arm-kernel, linux-sunxi, linux-kernel
DE33 makes its plane channels shared resources that mixers select through
routing registers in the display clock block. The existing mixer-local
plane initialization cannot represent that topology.
Add a driver that owns the shared plane register space, programs the
default channel-to-mixer mapping and creates each mixer's DRM planes
from that mapping.
The driver is only added here. It gets registered and used by the
mixer driver in a later patch, which switches DE33 to the new bindings.
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
drivers/gpu/drm/sun4i/Makefile | 3 +-
drivers/gpu/drm/sun4i/sun50i_planes.c | 209 ++++++++++++++++++++++++++
drivers/gpu/drm/sun4i/sun50i_planes.h | 43 ++++++
3 files changed, 254 insertions(+), 1 deletion(-)
create mode 100644 drivers/gpu/drm/sun4i/sun50i_planes.c
create mode 100644 drivers/gpu/drm/sun4i/sun50i_planes.h
diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile
index bad7497a0d11..501e3d867918 100644
--- a/drivers/gpu/drm/sun4i/Makefile
+++ b/drivers/gpu/drm/sun4i/Makefile
@@ -16,7 +16,8 @@ sun8i-drm-hdmi-y += sun8i_hdmi_phy_clk.o
sun8i-mixer-y += sun8i_mixer.o sun8i_ui_layer.o \
sun8i_vi_layer.o sun8i_ui_scaler.o \
- sun8i_vi_scaler.o sun8i_csc.o
+ sun8i_vi_scaler.o sun8i_csc.o \
+ sun50i_planes.o
sun4i-tcon-y += sun4i_crtc.o
sun4i-tcon-y += sun4i_tcon_dclk.o
diff --git a/drivers/gpu/drm/sun4i/sun50i_planes.c b/drivers/gpu/drm/sun4i/sun50i_planes.c
new file mode 100644
index 000000000000..05607445cc38
--- /dev/null
+++ b/drivers/gpu/drm/sun4i/sun50i_planes.c
@@ -0,0 +1,209 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* Copyright (c) 2026 Jernej Skrabec <jernej.skrabec@gmail.com> */
+
+#include <drm/drm_device.h>
+
+#include <linux/device.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+
+#include "sun50i_planes.h"
+#include "sun8i_ui_layer.h"
+#include "sun8i_vi_layer.h"
+
+static const struct sun50i_planes_quirks sun50i_h616_planes_quirks = {
+ .def_map = {
+ {
+ .map = {0, 6, 7},
+ .num_ch = 3,
+ },
+ {
+ .map = {1, 2, 8},
+ .num_ch = 3,
+ },
+ },
+ .cfg = {
+ .de_type = SUN8I_MIXER_DE33,
+ /*
+ * TODO: All planes support scaling, but driver needs
+ * improvements to properly support it.
+ */
+ .scaler_mask = 0,
+ .scanline_yuv = 4096,
+ },
+};
+
+static const struct of_device_id sun50i_planes_of_table[] = {
+ {
+ .compatible = "allwinner,sun50i-h616-de33-planes",
+ .data = &sun50i_h616_planes_quirks
+ },
+ { }
+};
+MODULE_DEVICE_TABLE(of, sun50i_planes_of_table);
+
+struct drm_plane **
+sun50i_planes_setup(struct device *dev, struct drm_device *drm,
+ unsigned int mixer)
+{
+ struct sun50i_planes *planes = dev_get_drvdata(dev);
+ const struct sun50i_planes_quirks *quirks;
+ struct drm_plane **drm_planes;
+ const struct default_map *map;
+ unsigned int i;
+
+ if (!of_match_node(sun50i_planes_of_table, dev->of_node))
+ return ERR_PTR(dev_err_probe(dev, -EINVAL,
+ "Device is not planes driver!\n"));
+
+ if (!planes)
+ return ERR_PTR(dev_err_probe(dev, -EINVAL,
+ "Planes driver is not loaded yet!\n"));
+
+ if (mixer >= MAX_DISP)
+ return ERR_PTR(dev_err_probe(dev, -EINVAL,
+ "Mixer index is too high!\n"));
+
+ quirks = planes->quirks;
+ map = &quirks->def_map[mixer];
+
+ drm_planes = devm_kcalloc(drm->dev, map->num_ch + 1,
+ sizeof(*drm_planes), GFP_KERNEL);
+ if (!drm_planes)
+ return ERR_PTR(-ENOMEM);
+
+ for (i = 0; i < map->num_ch; i++) {
+ unsigned int phy_ch = map->map[i];
+ struct sun8i_layer *layer;
+ enum drm_plane_type type;
+
+ if ((i == 0 && map->num_ch == 1) || i == 1)
+ type = DRM_PLANE_TYPE_PRIMARY;
+ else
+ type = DRM_PLANE_TYPE_OVERLAY;
+
+ if (phy_ch < UI_PLANE_OFFSET)
+ layer = sun8i_vi_layer_init_one(drm, type, planes->regs,
+ i, phy_ch, map->num_ch,
+ &quirks->cfg);
+ else
+ layer = sun8i_ui_layer_init_one(drm, type, planes->regs,
+ i, phy_ch, map->num_ch,
+ &quirks->cfg);
+
+ if (IS_ERR(layer))
+ return ERR_PTR(dev_err_probe(drm->dev, PTR_ERR(layer),
+ "Couldn't initialize DRM plane\n"));
+
+ drm_planes[i] = &layer->plane;
+ }
+
+ return drm_planes;
+}
+
+static void sun50i_planes_init_mapping(struct sun50i_planes *planes)
+{
+ const struct sun50i_planes_quirks *quirks = planes->quirks;
+ unsigned int i, j;
+ u32 mapping;
+
+ mapping = 0;
+ for (j = 0; j < MAX_DISP; j++)
+ for (i = 0; i < quirks->def_map[j].num_ch; i++) {
+ unsigned int ch = quirks->def_map[j].map[i];
+
+ if (ch < UI_PLANE_OFFSET)
+ mapping |= j << (ch * 2);
+ else
+ mapping |= j << ((ch - UI_PLANE_OFFSET) * 2 + 16);
+ }
+ regmap_write(planes->mapping, SUNXI_DE33_DE_CHN2CORE_MUX_REG, mapping);
+
+ for (j = 0; j < MAX_DISP; j++) {
+ mapping = 0;
+ for (i = 0; i < quirks->def_map[j].num_ch; i++) {
+ unsigned int ch = quirks->def_map[j].map[i];
+
+ if (ch >= UI_PLANE_OFFSET)
+ ch += 2;
+
+ mapping |= ch << (i * 4);
+ }
+ regmap_write(planes->mapping, SUNXI_DE33_DE_PORT02CHN_MUX_REG + j * 4, mapping);
+ }
+}
+
+static const struct regmap_config sun50i_planes_regmap_config = {
+ .name = "planes",
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+ .max_register = 0x17fffc,
+};
+
+static int sun50i_planes_probe(struct platform_device *pdev)
+{
+ struct platform_device *clk_pdev;
+ struct device *dev = &pdev->dev;
+ struct sun50i_planes *planes;
+ struct device_node *np;
+ void __iomem *regs;
+
+ planes = devm_kzalloc(dev, sizeof(*planes), GFP_KERNEL);
+ if (!planes)
+ return -ENOMEM;
+
+ planes->quirks = of_device_get_match_data(dev);
+ if (!planes->quirks)
+ return dev_err_probe(dev, -EINVAL, "Unable to get quirks\n");
+
+ np = of_parse_phandle(dev->of_node,
+ "allwinner,plane-mapping", 0);
+ if (!np)
+ return dev_err_probe(dev, -EINVAL, "Missing mapping phandle\n");
+
+ clk_pdev = of_find_device_by_node(np);
+ of_node_put(np);
+ if (!clk_pdev)
+ return dev_err_probe(dev, -EPROBE_DEFER, "Unable to get mapping\n");
+
+ /* Regmap is registered by display clocks driver during its probe. */
+ planes->mapping = dev_get_regmap(&clk_pdev->dev, NULL);
+ if (!planes->mapping) {
+ platform_device_put(clk_pdev);
+ return dev_err_probe(dev, -EPROBE_DEFER, "Unable to get regmap\n");
+ }
+
+ if (!device_link_add(dev, &clk_pdev->dev,
+ DL_FLAG_AUTOREMOVE_CONSUMER)) {
+ platform_device_put(clk_pdev);
+ return dev_err_probe(dev, -EINVAL, "Failed to create link\n");
+ }
+ platform_device_put(clk_pdev);
+
+ regs = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(regs))
+ return PTR_ERR(regs);
+
+ planes->regs = devm_regmap_init_mmio(dev, regs, &sun50i_planes_regmap_config);
+ if (IS_ERR(planes->regs))
+ return PTR_ERR(planes->regs);
+
+ sun50i_planes_init_mapping(planes);
+
+ dev_set_drvdata(dev, planes);
+
+ return 0;
+}
+
+struct platform_driver sun50i_planes_platform_driver = {
+ .probe = sun50i_planes_probe,
+ .driver = {
+ .name = "sun50i-planes",
+ .of_match_table = sun50i_planes_of_table,
+ },
+};
diff --git a/drivers/gpu/drm/sun4i/sun50i_planes.h b/drivers/gpu/drm/sun4i/sun50i_planes.h
new file mode 100644
index 000000000000..9b4f77a6b94e
--- /dev/null
+++ b/drivers/gpu/drm/sun4i/sun50i_planes.h
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* Copyright (c) 2026 Jernej Skrabec <jernej.skrabec@gmail.com> */
+
+#ifndef _SUN50I_PLANES_H_
+#define _SUN50I_PLANES_H_
+
+#include "sun8i_mixer.h"
+
+/* mapping registers, located in clock register space */
+#define SUNXI_DE33_DE_CHN2CORE_MUX_REG 0x24
+#define SUNXI_DE33_DE_PORT02CHN_MUX_REG 0x28
+#define SUNXI_DE33_DE_PORT12CHN_MUX_REG 0x2c
+
+#define MAX_DISP 2
+#define MAX_CHANNELS 8
+#define UI_PLANE_OFFSET 6
+
+struct regmap;
+struct drm_device;
+
+struct default_map {
+ unsigned int map[MAX_CHANNELS];
+ unsigned int num_ch;
+};
+
+struct sun50i_planes_quirks {
+ struct default_map def_map[MAX_DISP];
+ struct sun8i_layer_cfg cfg;
+};
+
+struct sun50i_planes {
+ struct regmap *regs;
+ struct regmap *mapping;
+ const struct sun50i_planes_quirks *quirks;
+};
+
+struct drm_plane **
+sun50i_planes_setup(struct device *dev, struct drm_device *drm,
+ unsigned int mixer);
+
+extern struct platform_driver sun50i_planes_platform_driver;
+
+#endif /* _SUN50I_PLANES_H_ */
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 4/5] dt-bindings: display: allwinner: Split H616 DE33 layer reg space
2026-11-19 17:54 [PATCH v4 0/5] drm/sun4i: update DE33 support Jernej Skrabec
` (2 preceding siblings ...)
2026-11-19 17:54 ` [PATCH v4 3/5] drm/sun4i: Add DE33 shared plane driver Jernej Skrabec
@ 2026-11-19 17:54 ` Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 5/5] drm/sun4i: Switch DE33 to split plane bindings Jernej Skrabec
4 siblings, 0 replies; 6+ messages in thread
From: Jernej Skrabec @ 2026-11-19 17:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Samuel Holland
Cc: mripard, maarten.lankhorst, tzimmermann, airlied, simona, robh,
krzk+dt, conor+dt, Andre Przywara, dri-devel, devicetree,
linux-arm-kernel, linux-sunxi, linux-kernel
As it turns out, current H616 DE33 binding was written based on
incomplete understanding of DE33 design. Namely, planes are shared
resource and not tied to specific mixer, which was the case for previous
generations of Display Engine (DE3 and earlier).
This means that current DE33 binding doesn't properly reflect HW and
using it would mean that second mixer (used for second display output)
can't be supported.
Remove layer register space, which will be represented with additional
node, and replace it with phandle, which will point to that new, shared
node. That way, all mixers can share same layers.
This change is intentionally not backward compatible and the old binding
will not be supported by the driver, for the following reasons:
- It can't describe the hardware. Plane register space is shared
between all mixers, but the old binding puts it in the mixer node, so
only one mixer can ever claim it. The second mixer can't be supported
with the old binding at all. It also has no way to reference plane to
mixer mapping registers, which live in display clocks register space.
- Supporting it would mean keeping a second, mixer-local plane
management path in the driver, with hardcoded plane mapping, which
doesn't match the hardware and which can't be tested, since nothing
uses it.
- It was never used. Upstream H616 DT has no Display Engine nodes and
the rest of H616 display pipeline (TCON, HDMI, PHY) is not supported
upstream yet, so the old binding never produced a working display.
Vendor BSP kernels use a completely different DT structure and no
other known DT consumer (U-Boot, *BSD, Zephyr, TF-A, ...) implements
H616 display support. Only out of tree WIP patches used it and those
are updated together with the kernel.
The driver will print an error, asking to update the device tree, when
the old binding is detected.
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
.../display/allwinner,sun8i-a83t-de2-mixer.yaml | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-de2-mixer.yaml b/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-de2-mixer.yaml
index cbd18fd83e52..064e4ca7e419 100644
--- a/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-de2-mixer.yaml
+++ b/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-de2-mixer.yaml
@@ -46,6 +46,10 @@ properties:
resets:
maxItems: 1
+ allwinner,planes:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: Phandle of Display Engine 3.3 planes node
+
ports:
$ref: /schemas/graph.yaml#/properties/ports
@@ -74,22 +78,22 @@ allOf:
properties:
reg:
description: |
- Registers for controlling individual layers of the display
- engine (layers), global control (top), and display blending
- control (display). Names are from Allwinner BSP kernel.
- maxItems: 3
+ Registers for display blending control (display) and global
+ control (top). Names are from Allwinner BSP kernel.
+ maxItems: 2
reg-names:
items:
- - const: layers
- - const: top
- const: display
+ - const: top
required:
- reg-names
+ - allwinner,planes
else:
properties:
reg:
maxItems: 1
+ allwinner,planes: false
required:
- compatible
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 5/5] drm/sun4i: Switch DE33 to split plane bindings
2026-11-19 17:54 [PATCH v4 0/5] drm/sun4i: update DE33 support Jernej Skrabec
` (3 preceding siblings ...)
2026-11-19 17:54 ` [PATCH v4 4/5] dt-bindings: display: allwinner: Split H616 DE33 layer reg space Jernej Skrabec
@ 2026-11-19 17:54 ` Jernej Skrabec
4 siblings, 0 replies; 6+ messages in thread
From: Jernej Skrabec @ 2026-11-19 17:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Samuel Holland
Cc: mripard, maarten.lankhorst, tzimmermann, airlied, simona, robh,
krzk+dt, conor+dt, Andre Przywara, dri-devel, devicetree,
linux-arm-kernel, linux-sunxi, linux-kernel
The shared plane driver and split register resources are now in place.
Switch DE33 mixer discovery to the new bindings and remove the legacy
per-mixer plane setup. Mixer register space now covers only display
blending control, so limit its regmap accordingly.
The old DE33 binding is not supported anymore, since it can't describe
shared planes and was never used by any device tree. If it's detected,
print an error asking the user to update the device tree, instead of
failing silently or misusing the plane register space as blender
registers.
Note that the plane driver doesn't enable the scalers yet, so H616
planes can't be scaled anymore after this change. YUV formats were
already removed for DE33 for the same reason.
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
drivers/gpu/drm/sun4i/sun8i_mixer.c | 191 ++++++++++++++++++++--------
drivers/gpu/drm/sun4i/sun8i_mixer.h | 11 +-
2 files changed, 136 insertions(+), 66 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
index dbde80b32080..4677180ec780 100644
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
@@ -13,6 +13,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_graph.h>
+#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
@@ -28,6 +29,7 @@
#include "sun8i_mixer.h"
#include "sun8i_ui_layer.h"
#include "sun8i_vi_layer.h"
+#include "sun50i_planes.h"
#include "sunxi_engine.h"
struct de2_fmt_info {
@@ -257,7 +259,6 @@ static void sun8i_mixer_commit(struct sunxi_engine *engine,
{
struct sun8i_mixer *mixer = engine_to_sun8i_mixer(engine);
u32 bld_base = sun8i_blender_base(mixer);
- struct regmap *bld_regs = sun8i_blender_regmap(mixer);
struct drm_plane_state *plane_state;
struct drm_plane *plane;
u32 route = 0, pipe_en = 0;
@@ -294,16 +295,16 @@ static void sun8i_mixer_commit(struct sunxi_engine *engine,
route |= layer->index << SUN8I_MIXER_BLEND_ROUTE_PIPE_SHIFT(zpos);
pipe_en |= SUN8I_MIXER_BLEND_PIPE_CTL_EN(zpos);
- regmap_write(bld_regs,
+ regmap_write(engine->regs,
SUN8I_MIXER_BLEND_ATTR_COORD(bld_base, zpos),
SUN8I_MIXER_COORD(x, y));
- regmap_write(bld_regs,
+ regmap_write(engine->regs,
SUN8I_MIXER_BLEND_ATTR_INSIZE(bld_base, zpos),
SUN8I_MIXER_SIZE(w, h));
}
- regmap_write(bld_regs, SUN8I_MIXER_BLEND_ROUTE(bld_base), route);
- regmap_write(bld_regs, SUN8I_MIXER_BLEND_PIPE_CTL(bld_base),
+ regmap_write(engine->regs, SUN8I_MIXER_BLEND_ROUTE(bld_base), route);
+ regmap_write(engine->regs, SUN8I_MIXER_BLEND_PIPE_CTL(bld_base),
pipe_en | SUN8I_MIXER_BLEND_PIPE_CTL_FC_EN(0));
if (mixer->cfg->de_type != SUN8I_MIXER_DE33)
@@ -318,7 +319,6 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
struct sun8i_mixer *mixer = engine_to_sun8i_mixer(engine);
int plane_cnt = mixer->cfg->ui_num + mixer->cfg->vi_num;
enum drm_plane_type type;
- unsigned int phy_index;
int i;
planes = devm_kzalloc_objs(drm->dev, *planes, plane_cnt + 1);
@@ -333,12 +333,8 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
else
type = DRM_PLANE_TYPE_OVERLAY;
- phy_index = i;
- if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
- phy_index = mixer->cfg->map[i];
-
layer = sun8i_vi_layer_init_one(drm, type, mixer->engine.regs,
- i, phy_index, plane_cnt,
+ i, i, plane_cnt,
&mixer->cfg->lay_cfg);
if (IS_ERR(layer)) {
dev_err(drm->dev,
@@ -358,12 +354,8 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
else
type = DRM_PLANE_TYPE_OVERLAY;
- phy_index = index;
- if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
- phy_index = mixer->cfg->map[index];
-
layer = sun8i_ui_layer_init_one(drm, type, mixer->engine.regs,
- index, phy_index, plane_cnt,
+ index, index, plane_cnt,
&mixer->cfg->lay_cfg);
if (IS_ERR(layer)) {
dev_err(drm->dev, "Couldn't initialize %s plane\n",
@@ -377,16 +369,34 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
return planes;
}
+static struct drm_plane **sun50i_layers_init(struct drm_device *drm,
+ struct sunxi_engine *engine)
+{
+ struct sun8i_mixer *mixer = engine_to_sun8i_mixer(engine);
+ unsigned int base = sun8i_blender_base(mixer);
+ struct drm_plane **planes;
+ int i;
+
+ planes = sun50i_planes_setup(mixer->planes_dev, drm, engine->id);
+ if (IS_ERR(planes))
+ return planes;
+
+ for (i = 0; planes[i]; i++)
+ regmap_write(engine->regs,
+ SUN8I_MIXER_BLEND_MODE(base, i),
+ SUN8I_MIXER_BLEND_MODE_DEF);
+
+ return planes;
+}
+
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);
- struct regmap *bld_regs;
u32 bld_base, size, val;
bool interlaced;
bld_base = sun8i_blender_base(mixer);
- bld_regs = sun8i_blender_regmap(mixer);
interlaced = !!(mode->flags & DRM_MODE_FLAG_INTERLACE);
size = SUN8I_MIXER_SIZE(mode->hdisplay, mode->vdisplay);
@@ -398,14 +408,14 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,
else
regmap_write(mixer->engine.regs, SUN8I_MIXER_GLOBAL_SIZE, size);
- regmap_write(bld_regs, SUN8I_MIXER_BLEND_OUTSIZE(bld_base), size);
+ regmap_write(engine->regs, SUN8I_MIXER_BLEND_OUTSIZE(bld_base), size);
if (interlaced)
val = SUN8I_MIXER_BLEND_OUTCTL_INTERLACED;
else
val = 0;
- regmap_update_bits(bld_regs, SUN8I_MIXER_BLEND_OUTCTL(bld_base),
+ regmap_update_bits(engine->regs, SUN8I_MIXER_BLEND_OUTCTL(bld_base),
SUN8I_MIXER_BLEND_OUTCTL_INTERLACED, val);
DRM_DEBUG_DRIVER("Switching display mixer interlaced mode %s\n",
@@ -418,6 +428,12 @@ static const struct sunxi_engine_ops sun8i_engine_ops = {
.mode_set = sun8i_mixer_mode_set,
};
+static const struct sunxi_engine_ops sun50i_engine_ops = {
+ .commit = sun8i_mixer_commit,
+ .layers_init = sun50i_layers_init,
+ .mode_set = sun8i_mixer_mode_set,
+};
+
static const struct regmap_config sun8i_mixer_regmap_config = {
.name = "layers",
.reg_bits = 32,
@@ -434,12 +450,12 @@ static const struct regmap_config sun8i_top_regmap_config = {
.max_register = 0x3c,
};
-static const struct regmap_config sun8i_disp_regmap_config = {
+static const struct regmap_config sun50i_mixer33_regmap_config = {
.name = "display",
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
- .max_register = 0x20000,
+ .max_register = 0x1fffc,
};
static int sun8i_mixer_of_get_id(struct device_node *node)
@@ -464,17 +480,14 @@ static int sun8i_mixer_of_get_id(struct device_node *node)
static void sun8i_mixer_init(struct sun8i_mixer *mixer)
{
- struct regmap *top_regs, *disp_regs;
unsigned int base = sun8i_blender_base(mixer);
+ struct regmap *top_regs;
int plane_cnt, i;
- if (mixer->cfg->de_type == SUN8I_MIXER_DE33) {
+ if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
top_regs = mixer->top_regs;
- disp_regs = mixer->disp_regs;
- } else {
+ else
top_regs = mixer->engine.regs;
- disp_regs = mixer->engine.regs;
- }
/* Enable the mixer */
regmap_write(top_regs, SUN8I_MIXER_GLOBAL_CTL,
@@ -484,25 +497,29 @@ static void sun8i_mixer_init(struct sun8i_mixer *mixer)
regmap_write(top_regs, SUN50I_MIXER_GLOBAL_CLK, 1);
/* Set background color to black */
- regmap_write(disp_regs, SUN8I_MIXER_BLEND_BKCOLOR(base),
+ regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_BKCOLOR(base),
SUN8I_MIXER_BLEND_COLOR_BLACK);
/*
* Set fill color of bottom plane to black. Generally not needed
* except when VI plane is at bottom (zpos = 0) and enabled.
*/
- regmap_write(disp_regs, SUN8I_MIXER_BLEND_PIPE_CTL(base),
+ regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_PIPE_CTL(base),
SUN8I_MIXER_BLEND_PIPE_CTL_FC_EN(0));
- regmap_write(disp_regs, SUN8I_MIXER_BLEND_ATTR_FCOLOR(base, 0),
+ regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_ATTR_FCOLOR(base, 0),
SUN8I_MIXER_BLEND_COLOR_BLACK);
+ /*
+ * plane_cnt is 0 for DE33. Blend mode will be initialized in
+ * layer init function, where the number of planes is known.
+ */
plane_cnt = mixer->cfg->vi_num + mixer->cfg->ui_num;
for (i = 0; i < plane_cnt; i++)
- regmap_write(disp_regs,
+ regmap_write(mixer->engine.regs,
SUN8I_MIXER_BLEND_MODE(base, i),
SUN8I_MIXER_BLEND_MODE_DEF);
- regmap_update_bits(disp_regs, SUN8I_MIXER_BLEND_PIPE_CTL(base),
+ regmap_update_bits(mixer->engine.regs, SUN8I_MIXER_BLEND_PIPE_CTL(base),
SUN8I_MIXER_BLEND_PIPE_CTL_EN_MSK, 0);
}
@@ -533,7 +550,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
if (!mixer)
return -ENOMEM;
dev_set_drvdata(dev, mixer);
- mixer->engine.ops = &sun8i_engine_ops;
mixer->engine.node = dev->of_node;
/*
@@ -566,12 +582,33 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
if (!mixer->cfg)
return -EINVAL;
+ if (mixer->cfg->de_type == SUN8I_MIXER_DE33) {
+ /*
+ * The original DE33 binding described planes as part of
+ * the mixer, which can't work with more than one mixer.
+ * It was never used by any device tree, so it's not
+ * supported.
+ */
+ if (of_property_match_string(dev->of_node, "reg-names", "layers") >= 0 ||
+ !of_property_present(dev->of_node, "allwinner,planes"))
+ return dev_err_probe(dev, -EINVAL,
+ "Unsupported DE33 mixer binding, please update the device tree\n");
+
+ mixer->engine.ops = &sun50i_engine_ops;
+ } else {
+ mixer->engine.ops = &sun8i_engine_ops;
+ }
+
regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
- mixer->engine.regs = devm_regmap_init_mmio(dev, regs,
- &sun8i_mixer_regmap_config);
+ if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
+ mixer->engine.regs = devm_regmap_init_mmio(dev, regs,
+ &sun50i_mixer33_regmap_config);
+ else
+ mixer->engine.regs = devm_regmap_init_mmio(dev, regs,
+ &sun8i_mixer_regmap_config);
if (IS_ERR(mixer->engine.regs)) {
dev_err(dev, "Couldn't create the mixer regmap\n");
return PTR_ERR(mixer->engine.regs);
@@ -588,17 +625,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
dev_err(dev, "Couldn't create the top regmap\n");
return PTR_ERR(mixer->top_regs);
}
-
- regs = devm_platform_ioremap_resource_byname(pdev, "display");
- if (IS_ERR(regs))
- return PTR_ERR(regs);
-
- mixer->disp_regs = devm_regmap_init_mmio(dev, regs,
- &sun8i_disp_regmap_config);
- if (IS_ERR(mixer->disp_regs)) {
- dev_err(dev, "Couldn't create the disp regmap\n");
- return PTR_ERR(mixer->disp_regs);
- }
}
mixer->reset = devm_reset_control_get(dev, NULL);
@@ -638,6 +664,36 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
clk_prepare_enable(mixer->mod_clk);
+ if (mixer->cfg->de_type == SUN8I_MIXER_DE33) {
+ struct platform_device *planes_pdev;
+ struct device_node *np;
+
+ np = of_parse_phandle(dev->of_node, "allwinner,planes", 0);
+ if (!np) {
+ ret = -ENODEV;
+ goto err_disable_mod_clk;
+ }
+
+ planes_pdev = of_find_device_by_node(np);
+ of_node_put(np);
+ if (!planes_pdev) {
+ ret = -EPROBE_DEFER;
+ goto err_disable_mod_clk;
+ }
+ mixer->planes_dev = &planes_pdev->dev;
+
+ /* Planes driver must not unbind between the check and the link */
+ scoped_guard(device, mixer->planes_dev) {
+ if (!device_is_bound(mixer->planes_dev))
+ ret = -EPROBE_DEFER;
+ else if (!device_link_add(dev, mixer->planes_dev,
+ DL_FLAG_AUTOREMOVE_CONSUMER))
+ ret = -EINVAL;
+ }
+ if (ret)
+ goto err_put_device;
+ }
+
list_add_tail(&mixer->engine.list, &drv->engine_list);
/* Reset registers and disable unused sub-engines */
@@ -672,6 +728,11 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
return 0;
+err_put_device:
+ if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
+ put_device(mixer->planes_dev);
+err_disable_mod_clk:
+ clk_disable_unprepare(mixer->mod_clk);
err_disable_bus_clk:
clk_disable_unprepare(mixer->bus_clk);
err_assert_reset:
@@ -686,6 +747,9 @@ static void sun8i_mixer_unbind(struct device *dev, struct device *master,
list_del(&mixer->engine.list);
+ if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
+ put_device(mixer->planes_dev);
+
clk_disable_unprepare(mixer->mod_clk);
clk_disable_unprepare(mixer->bus_clk);
reset_control_assert(mixer->reset);
@@ -867,16 +931,8 @@ static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
};
static const struct sun8i_mixer_cfg sun50i_h616_mixer0_cfg = {
- .lay_cfg = {
- .de_type = SUN8I_MIXER_DE33,
- .scaler_mask = 0xf,
- .scanline_yuv = 4096,
- },
.de_type = SUN8I_MIXER_DE33,
.mod_rate = 600000000,
- .ui_num = 3,
- .vi_num = 1,
- .map = {0, 6, 7, 8},
};
static const struct of_device_id sun8i_mixer_of_table[] = {
@@ -940,7 +996,30 @@ static struct platform_driver sun8i_mixer_platform_driver = {
.of_match_table = sun8i_mixer_of_table,
},
};
-module_platform_driver(sun8i_mixer_platform_driver);
+
+static int __init sun8i_mixer_module_init(void)
+{
+ int ret;
+
+ ret = platform_driver_register(&sun50i_planes_platform_driver);
+ if (ret)
+ return ret;
+
+ ret = platform_driver_register(&sun8i_mixer_platform_driver);
+ if (ret)
+ platform_driver_unregister(&sun50i_planes_platform_driver);
+
+ return ret;
+}
+
+static void __exit sun8i_mixer_module_exit(void)
+{
+ platform_driver_unregister(&sun8i_mixer_platform_driver);
+ platform_driver_unregister(&sun50i_planes_platform_driver);
+}
+
+module_init(sun8i_mixer_module_init);
+module_exit(sun8i_mixer_module_exit);
MODULE_AUTHOR("Icenowy Zheng <icenowy@aosc.io>");
MODULE_DESCRIPTION("Allwinner DE2 Mixer driver");
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.h b/drivers/gpu/drm/sun4i/sun8i_mixer.h
index e2f83301aae8..9552c0bd9b99 100644
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.h
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.h
@@ -193,7 +193,6 @@ struct sun8i_layer_cfg {
* @de_type: sun8i_mixer_type enum representing the display engine generation.
* @mod_rate: module clock rate that needs to be set in order to have
* a functional block.
- * @map: channel map for DE variants processing YUV separately (DE33)
*/
struct sun8i_mixer_cfg {
@@ -202,7 +201,6 @@ struct sun8i_mixer_cfg {
int ui_num;
unsigned int de_type;
unsigned long mod_rate;
- unsigned int map[6];
};
struct sun8i_mixer {
@@ -216,7 +214,7 @@ struct sun8i_mixer {
struct clk *mod_clk;
struct regmap *top_regs;
- struct regmap *disp_regs;
+ struct device *planes_dev;
};
enum {
@@ -252,13 +250,6 @@ sun8i_blender_base(struct sun8i_mixer *mixer)
return mixer->cfg->de_type == SUN8I_MIXER_DE3 ? DE3_BLD_BASE : DE2_BLD_BASE;
}
-static inline struct regmap *
-sun8i_blender_regmap(struct sun8i_mixer *mixer)
-{
- return mixer->cfg->de_type == SUN8I_MIXER_DE33 ?
- mixer->disp_regs : mixer->engine.regs;
-}
-
static inline u32
sun8i_channel_base(struct sun8i_layer *layer)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-19 17:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 17:54 [PATCH v4 0/5] drm/sun4i: update DE33 support Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 1/5] drm/sun4i: Reject fractional source coordinates without scaler Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 2/5] dt-bindings: display: allwinner: Add DE33 planes Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 3/5] drm/sun4i: Add DE33 shared plane driver Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 4/5] dt-bindings: display: allwinner: Split H616 DE33 layer reg space Jernej Skrabec
2026-11-19 17:54 ` [PATCH v4 5/5] drm/sun4i: Switch DE33 to split plane bindings Jernej Skrabec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox