mirror of
https://github.com/armbian/build.git
synced 2025-08-14 15:16:58 +02:00
* Rework patches for sunxi 5.15.4 * Rework patches sunxi for 5.15.5 * Kernel switch tag=v5.15.5 for sunxi EDGE * Temporarily disabled, requires rework. drivers/clk/sunxi-ng/sun8i-de33.c: In function ‘sunxi_de33_clk_probe’: drivers/clk/sunxi-ng/sun8i-de33.c:155:8: error: implicit declaration of function ‘sunxi_ccu_probe’; did you mean ‘of_sunxi_ccu_probe’? [-Werror=implicit-function-declarati> ret = sunxi_ccu_probe(pdev->dev.of_node, reg, ccu_desc); ^~~~~~~~~~~~~~~ of_sunxi_ccu_probe cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:277: drivers/clk/sunxi-ng/sun8i-de33.o] Error 1 make[2]: *** [scripts/Makefile.build:540: drivers/clk/sunxi-ng] Error 2 * Correct the comment.
138 lines
4.8 KiB
Diff
138 lines
4.8 KiB
Diff
From ca89b8a90eb439a38b8db643f6de2204826ef4be Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megous@megous.com>
|
|
Date: Wed, 3 Jun 2020 11:06:05 +0200
|
|
Subject: [PATCH 311/467] drm debugging code
|
|
|
|
---
|
|
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 14 ++++++++++++++
|
|
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 22 ++++++++++++++++++++++
|
|
2 files changed, 36 insertions(+)
|
|
|
|
diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
|
index ccbf36800..9c2afbfd5 100644
|
|
--- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c
|
|
@@ -29,6 +29,7 @@ static void sun8i_ui_layer_enable(struct sun8i_mixer *mixer, int channel,
|
|
{
|
|
u32 val, bld_base, ch_base;
|
|
unsigned int old_pipe_ch;
|
|
+ unsigned tmp;
|
|
|
|
bld_base = sun8i_blender_base(mixer);
|
|
ch_base = sun8i_channel_base(mixer, channel);
|
|
@@ -101,6 +102,10 @@ static void sun8i_ui_layer_enable(struct sun8i_mixer *mixer, int channel,
|
|
|
|
DRM_DEBUG_DRIVER(" enable pipe %d <- ch %d\n", zpos, channel);
|
|
}
|
|
+
|
|
+ regmap_read(mixer->engine.regs,
|
|
+ SUN8I_MIXER_CHAN_UI_LAYER_ATTR(ch_base, overlay), &tmp);
|
|
+ DRM_DEBUG_DRIVER(" post-en-dis %08x\n", tmp);
|
|
}
|
|
|
|
static void sun8i_ui_layer_update_alpha(struct sun8i_mixer *mixer, int channel,
|
|
@@ -228,6 +233,7 @@ static int sun8i_ui_layer_update_formats(struct sun8i_mixer *mixer, int channel,
|
|
struct drm_plane_state *state = plane->state;
|
|
const struct drm_format_info *fmt;
|
|
u32 val, ch_base, hw_fmt;
|
|
+ unsigned tmp;
|
|
int ret;
|
|
|
|
ch_base = sun8i_channel_base(mixer, channel);
|
|
@@ -239,11 +245,19 @@ static int sun8i_ui_layer_update_formats(struct sun8i_mixer *mixer, int channel,
|
|
return -EINVAL;
|
|
}
|
|
|
|
+ regmap_read(mixer->engine.regs,
|
|
+ SUN8I_MIXER_CHAN_UI_LAYER_ATTR(ch_base, overlay), &tmp);
|
|
+ DRM_DEBUG_DRIVER(" pre-format %08x\n", tmp);
|
|
+
|
|
val = hw_fmt << SUN8I_MIXER_CHAN_UI_LAYER_ATTR_FBFMT_OFFSET;
|
|
regmap_update_bits(mixer->engine.regs,
|
|
SUN8I_MIXER_CHAN_UI_LAYER_ATTR(ch_base, overlay),
|
|
SUN8I_MIXER_CHAN_UI_LAYER_ATTR_FBFMT_MASK, val);
|
|
|
|
+ regmap_read(mixer->engine.regs,
|
|
+ SUN8I_MIXER_CHAN_UI_LAYER_ATTR(ch_base, overlay), &tmp);
|
|
+ DRM_DEBUG_DRIVER(" post-format %08x\n", tmp);
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c
|
|
index 7d20fe583..cd394b883 100644
|
|
--- a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c
|
|
@@ -23,6 +23,7 @@ static void sun8i_vi_layer_enable(struct sun8i_mixer *mixer, int channel,
|
|
{
|
|
u32 val, bld_base, ch_base;
|
|
unsigned int old_pipe_ch;
|
|
+ unsigned tmp;
|
|
|
|
bld_base = sun8i_blender_base(mixer);
|
|
ch_base = sun8i_channel_base(mixer, channel);
|
|
@@ -95,6 +96,10 @@ static void sun8i_vi_layer_enable(struct sun8i_mixer *mixer, int channel,
|
|
|
|
DRM_DEBUG_DRIVER(" enable pipe %d <- ch %d\n", zpos, channel);
|
|
}
|
|
+
|
|
+ regmap_read(mixer->engine.regs,
|
|
+ SUN8I_MIXER_CHAN_VI_LAYER_ATTR(ch_base, overlay), &tmp);
|
|
+ DRM_DEBUG_DRIVER(" post-en-dis %08x\n", tmp);
|
|
}
|
|
|
|
static void sun8i_vi_layer_update_alpha(struct sun8i_mixer *mixer, int channel,
|
|
@@ -294,6 +299,7 @@ static int sun8i_vi_layer_update_formats(struct sun8i_mixer *mixer, int channel,
|
|
struct drm_plane_state *state = plane->state;
|
|
u32 val, ch_base, csc_mode, hw_fmt;
|
|
const struct drm_format_info *fmt;
|
|
+ unsigned tmp;
|
|
int ret;
|
|
|
|
ch_base = sun8i_channel_base(mixer, channel);
|
|
@@ -305,11 +311,19 @@ static int sun8i_vi_layer_update_formats(struct sun8i_mixer *mixer, int channel,
|
|
return ret;
|
|
}
|
|
|
|
+ regmap_read(mixer->engine.regs,
|
|
+ SUN8I_MIXER_CHAN_VI_LAYER_ATTR(ch_base, overlay), &tmp);
|
|
+ DRM_DEBUG_DRIVER(" pre-format %08x\n", tmp);
|
|
+
|
|
val = hw_fmt << SUN8I_MIXER_CHAN_VI_LAYER_ATTR_FBFMT_OFFSET;
|
|
regmap_update_bits(mixer->engine.regs,
|
|
SUN8I_MIXER_CHAN_VI_LAYER_ATTR(ch_base, overlay),
|
|
SUN8I_MIXER_CHAN_VI_LAYER_ATTR_FBFMT_MASK, val);
|
|
|
|
+ regmap_read(mixer->engine.regs,
|
|
+ SUN8I_MIXER_CHAN_VI_LAYER_ATTR(ch_base, overlay), &tmp);
|
|
+ DRM_DEBUG_DRIVER(" mid1-format %08x\n", tmp);
|
|
+
|
|
csc_mode = sun8i_vi_layer_get_csc_mode(fmt);
|
|
if (csc_mode != SUN8I_CSC_MODE_OFF) {
|
|
sun8i_csc_set_ccsc_coefficients(mixer, channel, csc_mode,
|
|
@@ -320,6 +334,10 @@ static int sun8i_vi_layer_update_formats(struct sun8i_mixer *mixer, int channel,
|
|
sun8i_csc_enable_ccsc(mixer, channel, false);
|
|
}
|
|
|
|
+ regmap_read(mixer->engine.regs,
|
|
+ SUN8I_MIXER_CHAN_VI_LAYER_ATTR(ch_base, overlay), &tmp);
|
|
+ DRM_DEBUG_DRIVER(" mid2-format %08x\n", tmp);
|
|
+
|
|
if (!fmt->is_yuv)
|
|
val = SUN8I_MIXER_CHAN_VI_LAYER_ATTR_RGB_MODE;
|
|
else
|
|
@@ -329,6 +347,10 @@ static int sun8i_vi_layer_update_formats(struct sun8i_mixer *mixer, int channel,
|
|
SUN8I_MIXER_CHAN_VI_LAYER_ATTR(ch_base, overlay),
|
|
SUN8I_MIXER_CHAN_VI_LAYER_ATTR_RGB_MODE, val);
|
|
|
|
+ regmap_read(mixer->engine.regs,
|
|
+ SUN8I_MIXER_CHAN_VI_LAYER_ATTR(ch_base, overlay), &tmp);
|
|
+ DRM_DEBUG_DRIVER(" post-format %08x\n", tmp);
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
--
|
|
2.34.0
|
|
|