I have changed the way the patches are generated a bit. Instead of using orange-pi branch from megous tree for 6.6 kernel, I have used the following kernel branches a83t-suspend, af8133j, anx, audio, axp, cam, drm, err, fixes, mbus, modem, opi3, pb, pinetab, pp, ppkb, samuel, speed, tbs-a711, ths These branches were carefully chosen to include only allwinner related patches and remove importing of the rockchip related patches into the allwinner kernel. Following patches are modified to fix patch application failure - patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-reg_usb1_vbus-status-ok.patch - patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-Enable-GPU-mali.patch - patches.armbian/arm64-dts-allwinner-h616-Add-efuse_xlate-cpu-frequency-scaling-v1_6_2.patch - patches.armbian/arm64-dts-allwinner-h616-LED-green_power_on-red_status_heartbeat.patch - patches.armbian/arm64-dts-allwinner-overlay-Add-Overlays-for-sunxi64.patch - patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch Following patches are modified because of kernel api change to fix compilation failure - patches.armbian/drv-gpu-drm-sun4i-Add-HDMI-audio-sun4i-hdmi-encoder.patch - patches.armbian/drv-of-Device-Tree-Overlay-ConfigFS-interface.patch
113 lines
3.6 KiB
Diff
113 lines
3.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Mon, 31 Oct 2022 03:01:28 +0100
|
|
Subject: drm/sun4i: Add more parameters to sunxi_engine commit callback
|
|
|
|
These will be needed later on when we move layer configuration to
|
|
crtc update.
|
|
|
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
|
---
|
|
drivers/gpu/drm/sun4i/sun4i_backend.c | 4 ++-
|
|
drivers/gpu/drm/sun4i/sun4i_crtc.c | 2 +-
|
|
drivers/gpu/drm/sun4i/sun8i_mixer.c | 5 +++-
|
|
drivers/gpu/drm/sun4i/sunxi_engine.h | 13 +++++++---
|
|
4 files changed, 18 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
|
|
index 335fd0edb904..e89eb96d3131 100644
|
|
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
|
|
@@ -69,7 +69,9 @@ static void sun4i_backend_disable_color_correction(struct sunxi_engine *engine)
|
|
SUN4I_BACKEND_OCCTL_ENABLE, 0);
|
|
}
|
|
|
|
-static void sun4i_backend_commit(struct sunxi_engine *engine)
|
|
+static void sun4i_backend_commit(struct sunxi_engine *engine,
|
|
+ struct drm_crtc *crtc,
|
|
+ struct drm_atomic_state *state)
|
|
{
|
|
DRM_DEBUG_DRIVER("Committing changes\n");
|
|
|
|
diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c
|
|
index c06d7cd45388..18e74047b0f5 100644
|
|
--- a/drivers/gpu/drm/sun4i/sun4i_crtc.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c
|
|
@@ -91,7 +91,7 @@ static void sun4i_crtc_atomic_flush(struct drm_crtc *crtc,
|
|
|
|
DRM_DEBUG_DRIVER("Committing plane changes\n");
|
|
|
|
- sunxi_engine_commit(scrtc->engine);
|
|
+ sunxi_engine_commit(scrtc->engine, crtc, state);
|
|
|
|
if (event) {
|
|
crtc->state->event = NULL;
|
|
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
|
index 1e681314e379..bdeb9b80e038 100644
|
|
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
|
@@ -16,6 +16,7 @@
|
|
#include <linux/platform_device.h>
|
|
#include <linux/reset.h>
|
|
|
|
+#include <drm/drm_atomic.h>
|
|
#include <drm/drm_atomic_helper.h>
|
|
#include <drm/drm_crtc.h>
|
|
#include <drm/drm_framebuffer.h>
|
|
@@ -249,7 +250,9 @@ int sun8i_mixer_drm_format_to_hw(u32 format, u32 *hw_format)
|
|
return -EINVAL;
|
|
}
|
|
|
|
-static void sun8i_mixer_commit(struct sunxi_engine *engine)
|
|
+static void sun8i_mixer_commit(struct sunxi_engine *engine,
|
|
+ struct drm_crtc *crtc,
|
|
+ struct drm_atomic_state *state)
|
|
{
|
|
DRM_DEBUG_DRIVER("Committing changes\n");
|
|
|
|
diff --git a/drivers/gpu/drm/sun4i/sunxi_engine.h b/drivers/gpu/drm/sun4i/sunxi_engine.h
|
|
index ec8cf9b2bda4..ec0c4932f15c 100644
|
|
--- a/drivers/gpu/drm/sun4i/sunxi_engine.h
|
|
+++ b/drivers/gpu/drm/sun4i/sunxi_engine.h
|
|
@@ -7,6 +7,7 @@
|
|
#define _SUNXI_ENGINE_H_
|
|
|
|
struct drm_plane;
|
|
+struct drm_crtc;
|
|
struct drm_device;
|
|
struct drm_crtc_state;
|
|
struct drm_display_mode;
|
|
@@ -59,7 +60,9 @@ struct sunxi_engine_ops {
|
|
*
|
|
* This function is optional.
|
|
*/
|
|
- void (*commit)(struct sunxi_engine *engine);
|
|
+ void (*commit)(struct sunxi_engine *engine,
|
|
+ struct drm_crtc *crtc,
|
|
+ struct drm_atomic_state *state);
|
|
|
|
/**
|
|
* @layers_init:
|
|
@@ -144,12 +147,16 @@ struct sunxi_engine {
|
|
/**
|
|
* sunxi_engine_commit() - commit all changes of the engine
|
|
* @engine: pointer to the engine
|
|
+ * @crtc: pointer to crtc the engine is associated with
|
|
+ * @state: atomic state
|
|
*/
|
|
static inline void
|
|
-sunxi_engine_commit(struct sunxi_engine *engine)
|
|
+sunxi_engine_commit(struct sunxi_engine *engine,
|
|
+ struct drm_crtc *crtc,
|
|
+ struct drm_atomic_state *state)
|
|
{
|
|
if (engine->ops && engine->ops->commit)
|
|
- engine->ops->commit(engine);
|
|
+ engine->ops->commit(engine, crtc, state);
|
|
}
|
|
|
|
/**
|
|
--
|
|
Armbian
|
|
|