mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-24 05:48:41 +00:00
* Attach Meson64 CURRENT to 5.6.y and make DEV = CURRENT at this point. There is a lot of changes to 5.7.y and can be done after release or by someone that feels a need for this right now. * Delete meson64_fclk_div3.patch this fix has been upstream for some time, I had issues with it on 5.4, which is why it had been removed there. * [ meson64 current ] kconfig tweak disable Rockchip SoC drivers * [ meson64 current ] remove rockchip patches * [ meson64 current ] disable CMA patch GX * [ meson64 current] add libretech cc audio patch This brings the dts even with the khilman 5.8/integ branch which includes all of the audio changes. The kernel is registering audio devices, however nothing comes out. committed in case someone wants to spend time debugging/testing theories. * fix permissions was editing from another machine, accidental change of permissions in the patch * Set default mixer settings Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com> * [ meson64 current ] GXL audio commit This moves to the mainline patches and covers le potato and la frite. Adjusted asound config to handle a commonized sound card name. * [ meson64 current ] add gxbb audio WIP Playback is too fast, a clock setting is off somewhere. * Update kernel configs Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com> Co-authored-by: Tony <tonymckahan@gmail.com>
160 lines
5.4 KiB
Diff
160 lines
5.4 KiB
Diff
From 8e6c592ce9779efbcdab03312a058887297eaeaf Mon Sep 17 00:00:00 2001
|
|
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
Date: Thu, 20 Feb 2020 17:16:57 +0000
|
|
Subject: [PATCH 079/101] FROMLIST: drm/meson: crtc: handle commit of Amlogic
|
|
FBC frames
|
|
|
|
Since the VD1 Amlogic FBC decoder is now configured by the overlay driver,
|
|
commit the right registers to decode the Amlogic FBC frame.
|
|
|
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
---
|
|
drivers/gpu/drm/meson/meson_crtc.c | 118 +++++++++++++++++++++--------
|
|
1 file changed, 88 insertions(+), 30 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/meson/meson_crtc.c b/drivers/gpu/drm/meson/meson_crtc.c
|
|
index e66b6271ff58..d6dcfd654e9c 100644
|
|
--- a/drivers/gpu/drm/meson/meson_crtc.c
|
|
+++ b/drivers/gpu/drm/meson/meson_crtc.c
|
|
@@ -291,6 +291,10 @@ static void meson_crtc_enable_vd1(struct meson_drm *priv)
|
|
VPP_VD1_PREBLEND | VPP_VD1_POSTBLEND |
|
|
VPP_COLOR_MNG_ENABLE,
|
|
priv->io_base + _REG(VPP_MISC));
|
|
+
|
|
+ writel_bits_relaxed(VIU_CTRL0_AFBC_TO_VD1,
|
|
+ priv->viu.vd1_afbc ? VIU_CTRL0_AFBC_TO_VD1 : 0,
|
|
+ priv->io_base + _REG(VIU_MISC_CTRL0));
|
|
}
|
|
|
|
static void meson_g12a_crtc_enable_vd1(struct meson_drm *priv)
|
|
@@ -300,6 +304,10 @@ static void meson_g12a_crtc_enable_vd1(struct meson_drm *priv)
|
|
VD_BLEND_POSTBLD_SRC_VD1 |
|
|
VD_BLEND_POSTBLD_PREMULT_EN,
|
|
priv->io_base + _REG(VD1_BLEND_SRC_CTRL));
|
|
+
|
|
+ writel_relaxed(priv->viu.vd1_afbc ?
|
|
+ (VD1_AXI_SEL_AFBC | AFBC_VD1_SEL) : 0,
|
|
+ priv->io_base + _REG(VD1_AFBCD0_MISC_CTRL));
|
|
}
|
|
|
|
void meson_crtc_irq(struct meson_drm *priv)
|
|
@@ -383,36 +391,86 @@ void meson_crtc_irq(struct meson_drm *priv)
|
|
/* Update the VD1 registers */
|
|
if (priv->viu.vd1_enabled && priv->viu.vd1_commit) {
|
|
|
|
- switch (priv->viu.vd1_planes) {
|
|
- case 3:
|
|
- meson_canvas_config(priv->canvas,
|
|
- priv->canvas_id_vd1_2,
|
|
- priv->viu.vd1_addr2,
|
|
- priv->viu.vd1_stride2,
|
|
- priv->viu.vd1_height2,
|
|
- MESON_CANVAS_WRAP_NONE,
|
|
- MESON_CANVAS_BLKMODE_LINEAR,
|
|
- MESON_CANVAS_ENDIAN_SWAP64);
|
|
- /* fallthrough */
|
|
- case 2:
|
|
- meson_canvas_config(priv->canvas,
|
|
- priv->canvas_id_vd1_1,
|
|
- priv->viu.vd1_addr1,
|
|
- priv->viu.vd1_stride1,
|
|
- priv->viu.vd1_height1,
|
|
- MESON_CANVAS_WRAP_NONE,
|
|
- MESON_CANVAS_BLKMODE_LINEAR,
|
|
- MESON_CANVAS_ENDIAN_SWAP64);
|
|
- /* fallthrough */
|
|
- case 1:
|
|
- meson_canvas_config(priv->canvas,
|
|
- priv->canvas_id_vd1_0,
|
|
- priv->viu.vd1_addr0,
|
|
- priv->viu.vd1_stride0,
|
|
- priv->viu.vd1_height0,
|
|
- MESON_CANVAS_WRAP_NONE,
|
|
- MESON_CANVAS_BLKMODE_LINEAR,
|
|
- MESON_CANVAS_ENDIAN_SWAP64);
|
|
+ if (priv->viu.vd1_afbc) {
|
|
+ writel_relaxed(priv->viu.vd1_afbc_head_addr,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_HEAD_BADDR));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_body_addr,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_BODY_BADDR));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_en,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_ENABLE));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_mode,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_MODE));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_size_in,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_SIZE_IN));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_dec_def_color,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_DEC_DEF_COLOR));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_conv_ctrl,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_CONV_CTRL));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_size_out,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_SIZE_OUT));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_vd_cfmt_ctrl,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_VD_CFMT_CTRL));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_vd_cfmt_w,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_VD_CFMT_W));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_mif_hor_scope,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_MIF_HOR_SCOPE));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_mif_ver_scope,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_MIF_VER_SCOPE));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_pixel_hor_scope,
|
|
+ priv->io_base+
|
|
+ _REG(AFBC_PIXEL_HOR_SCOPE));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_pixel_ver_scope,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_PIXEL_VER_SCOPE));
|
|
+ writel_relaxed(priv->viu.vd1_afbc_vd_cfmt_h,
|
|
+ priv->io_base +
|
|
+ _REG(AFBC_VD_CFMT_H));
|
|
+ } else {
|
|
+ switch (priv->viu.vd1_planes) {
|
|
+ case 3:
|
|
+ meson_canvas_config(priv->canvas,
|
|
+ priv->canvas_id_vd1_2,
|
|
+ priv->viu.vd1_addr2,
|
|
+ priv->viu.vd1_stride2,
|
|
+ priv->viu.vd1_height2,
|
|
+ MESON_CANVAS_WRAP_NONE,
|
|
+ MESON_CANVAS_BLKMODE_LINEAR,
|
|
+ MESON_CANVAS_ENDIAN_SWAP64);
|
|
+ /* fallthrough */
|
|
+ case 2:
|
|
+ meson_canvas_config(priv->canvas,
|
|
+ priv->canvas_id_vd1_1,
|
|
+ priv->viu.vd1_addr1,
|
|
+ priv->viu.vd1_stride1,
|
|
+ priv->viu.vd1_height1,
|
|
+ MESON_CANVAS_WRAP_NONE,
|
|
+ MESON_CANVAS_BLKMODE_LINEAR,
|
|
+ MESON_CANVAS_ENDIAN_SWAP64);
|
|
+ /* fallthrough */
|
|
+ case 1:
|
|
+ meson_canvas_config(priv->canvas,
|
|
+ priv->canvas_id_vd1_0,
|
|
+ priv->viu.vd1_addr0,
|
|
+ priv->viu.vd1_stride0,
|
|
+ priv->viu.vd1_height0,
|
|
+ MESON_CANVAS_WRAP_NONE,
|
|
+ MESON_CANVAS_BLKMODE_LINEAR,
|
|
+ MESON_CANVAS_ENDIAN_SWAP64);
|
|
+ }
|
|
+
|
|
+ writel_relaxed(0, priv->io_base + _REG(AFBC_ENABLE));
|
|
}
|
|
|
|
writel_relaxed(priv->viu.vd1_if0_gen_reg,
|
|
--
|
|
2.17.1
|
|
|