module_param(dolby_vision_graphic_max, uint, 0664);
MODULE_PARM_DESC(dolby_vision_graphic_max, "\n dolby_vision_graphic_max\n");
+/*these two parameters form OSD*/
+static unsigned int osd_graphic_width = 1920;
+static unsigned int osd_graphic_height = 1080;
+
static unsigned int dv_cert_graphic_width = 1920;
static unsigned int dv_cert_graphic_height = 1080;
module_param(dv_cert_graphic_width, uint, 0664);
VSYNC_WR_MPEG_REG(DOLBY_CORE2A_CLKGATE_CTRL, 0);
VSYNC_WR_MPEG_REG(DOLBY_CORE2A_SWAP_CTRL0, 0);
- if (is_meson_gxm() ||
- is_meson_g12() || reset) {
+ if (is_meson_gxm() || is_meson_g12() || reset) {
VSYNC_WR_MPEG_REG(DOLBY_CORE2A_SWAP_CTRL1,
((hsize + g_htotal_add) << 16)
| (vsize + g_vtotal_add + g_vsize_add));
return 0;
}
+void update_graphic_width_height(unsigned int width,
+ unsigned int height)
+{
+ osd_graphic_width = width;
+ osd_graphic_height = height;
+}
+
static void apply_stb_core_settings(
int enable, unsigned int mask,
bool reset, u32 frame_size, u8 pps_state)
#else
u32 core1_dm_count = 24;
#endif
- u32 graphics_w = 1920;
- u32 graphics_h = 1080;
+ u32 graphics_w = osd_graphic_width;
+ u32 graphics_h = osd_graphic_height;
if (is_dolby_vision_stb_mode()
&& (dolby_vision_flags & FLAG_CERTIFICAION)) {
graphics_w = dv_cert_graphic_width;
graphics_h = dv_cert_graphic_height;
}
- if (is_meson_txlx_package_962E()
+ if (is_meson_txlx_stbmode()
|| force_stb_mode) {
if ((vinfo->width >= 1920) &&
(vinfo->height >= 1080) &&
g_vpotch = 0x20;
}
if (mask & 1) {
- if (is_meson_txlx_package_962E()
+ if (is_meson_txlx_stbmode()
|| force_stb_mode) {
stb_dolby_core1_set(
27, 173, 256 * 5,
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
#include <linux/amlogic/media/video_sink/video.h>
#endif
+#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
+#include <linux/amlogic/media/amdolbyvision/dolby_vision.h>
+#endif
+
/* Local Headers */
#include "osd_canvas.h"
#include "osd_prot.h"
VSYNCOSD_WR_MPEG_REG(
DOLBY_CORE2A_SWAP_CTRL2,
(buffer_w << 16) | (buffer_h + 0));
+
+#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
+ update_graphic_width_height(buffer_w, buffer_h);
+#endif
}
data32 = VSYNCOSD_RD_MPEG_REG(osd_reg->osd_ctrl_stat);
data32 &= ~0x1ff008;//0x1ff00e;
VSYNCOSD_WR_MPEG_REG(
DOLBY_CORE2A_SWAP_CTRL2,
(buffer_w << 16) | (buffer_h + 0));
+#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
+ update_graphic_width_height(buffer_w, buffer_h);
+#endif
}
if (osd_hw.osd_afbcd[OSD1].enable &&
!osd_afbc_dec_enable &&