63 lines
2.3 KiB
Diff
63 lines
2.3 KiB
Diff
From 5346ee4b6df5ef2fbb3066fbff022334636263d5 Mon Sep 17 00:00:00 2001
|
|||
|
|
From: "yujun.zhang" <yujun.zhang@amlogic.com>
|
||
|
|
Date: Fri, 31 Jul 2026 14:44:55 +0800
|
||
|
|
Subject: [PATCH 4/6] drm: fix a9 smpte mode on osd3 [1/1]
|
||
|
|
|
||
|
|
Change-Id: I66bb0ddd4f0af830c2ba2e83b64d84866a7e0aa4
|
||
|
|
Signed-off-by: yujun.zhang <yujun.zhang@amlogic.com>
|
||
|
|
---
|
||
|
|
drivers/drm/vpu-hw/meson_osd_scaler.c | 30 ++++++++++++++++++++++++++-
|
||
|
|
1 file changed, 29 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/drivers/drm/vpu-hw/meson_osd_scaler.c b/drivers/drm/vpu-hw/meson_osd_scaler.c
|
||
|
|
index 367f492c13..a7c4c128c5 100644
|
||
|
|
--- a/drivers/drm/vpu-hw/meson_osd_scaler.c
|
||
|
|
+++ b/drivers/drm/vpu-hw/meson_osd_scaler.c
|
||
|
|
@@ -1260,6 +1260,34 @@ static void scaler_set_state(struct meson_vpu_block *vblk,
|
||
|
|
scaler_state->output_width, scaler_state->output_height);
|
||
|
|
}
|
||
|
|
|
||
|
|
+static void a9_scaler_set_state(struct meson_vpu_block *vblk,
|
||
|
|
+ struct meson_vpu_block_state *state,
|
||
|
|
+ struct meson_vpu_block_state *old_state,
|
||
|
|
+ struct meson_vpu_sub_pipeline_state *mvsps)
|
||
|
|
+{
|
||
|
|
+ struct meson_vpu_scaler *scaler = to_scaler_block(vblk);
|
||
|
|
+ struct meson_vpu_scaler_state *scaler_state = to_scaler_state(state);
|
||
|
|
+ struct osd_scaler_reg_s *reg = scaler->reg;
|
||
|
|
+
|
||
|
|
+ scaler_set_state(vblk, state, old_state, mvsps);
|
||
|
|
+
|
||
|
|
+ if (vblk->index == MESON_OSD3) {
|
||
|
|
+ struct meson_vpu_osd_layer_info *plane_info =
|
||
|
|
+ &mvsps->plane_info[vblk->index];
|
||
|
|
+
|
||
|
|
+ if (plane_info->process_unit == MIF_MODE &&
|
||
|
|
+ scaler_state->input_width == 4096 &&
|
||
|
|
+ scaler_state->output_width == 4096 &&
|
||
|
|
+ scaler_state->input_height == 2160 &&
|
||
|
|
+ scaler_state->output_height == 2160) {
|
||
|
|
+ osd_vsc_enable_set(vblk, state->sub->reg_ops, reg, false);
|
||
|
|
+ osd_hsc_enable_set(vblk, state->sub->reg_ops, reg, false);
|
||
|
|
+ osd_sc_en_set(vblk, state->sub->reg_ops, reg, false);
|
||
|
|
+ osd_sc_path_en_set(vblk, state->sub->reg_ops, reg, false);
|
||
|
|
+ }
|
||
|
|
+ }
|
||
|
|
+}
|
||
|
|
+
|
||
|
|
static void scaler_hw_enable(struct meson_vpu_block *vblk,
|
||
|
|
struct meson_vpu_block_state *state)
|
||
|
|
{
|
||
|
|
@@ -1595,7 +1623,7 @@ struct meson_vpu_block_ops t6d_scaler_ops = {
|
||
|
|
|
||
|
|
struct meson_vpu_block_ops a9_scaler_ops = {
|
||
|
|
.check_state = scaler_check_state,
|
||
|
|
- .update_state = scaler_set_state,
|
||
|
|
+ .update_state = a9_scaler_set_state,
|
||
|
|
.enable = scaler_hw_enable,
|
||
|
|
.disable = scaler_hw_disable,
|
||
|
|
.dump_register = scaler_dump_register,
|
||
|
|
--
|
||
|
|
2.43.2
|
||
|
|
|