Skip to content

Commit a55e510

Browse files
committed
Rockchip64 current: fixing broken patch
1 parent 81d65b0 commit a55e510

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

patch/kernel/archive/rockchip64-6.12/rk3588-0133-drm-rockchip-vop2-Improve-display-modes-handling.patch

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,21 @@ index 111111111111..222222222222 100644
6767
#include <linux/component.h>
6868
#include <linux/delay.h>
6969
#include <linux/iopoll.h>
70-
@@ -212,6 +214,10 @@ struct vop2 {
70+
@@ -214,11 +214,13 @@ struct vop2 {
71+
*/
72+
unsigned int enable_count;
7173
struct clk *hclk;
7274
struct clk *aclk;
7375
struct clk *pclk;
74-
+ // [CC:] hack to support additional display modes
76+
- struct clk *pll_hdmiphy0;
7577
+ struct clk *hdmi0_phy_pll;
7678
+ /* list_head of internal clk */
7779
+ struct list_head clk_list_head;
7880

7981
/* optional internal rgb encoder */
8082
struct rockchip_rgb *rgb;
83+
84+
/* must be put at the end of the struct */
8185
@@ -220,6 +226,19 @@ struct vop2 {
8286
struct vop2_win win[];
8387
};
@@ -266,7 +270,9 @@ index 111111111111..222222222222 100644
266270

267271
drm_dbg(vop2->drm, "Update mode to %dx%d%s%d, type: %d for vp%d\n",
268272
hdisplay, vdisplay, mode->flags & DRM_MODE_FLAG_INTERLACE ? "i" : "p",
269-
@@ -2044,11 +2193,38 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
273+
@@ -2238,15 +2240,43 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
274+
275+
vop2_vp_write(vp, RK3568_VP_DSP_VTOTAL_VS_END, vtotal << 16 | vsync_len);
270276

271277
if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
272278
dsp_ctrl |= RK3568_VP_DSP_CTRL__CORE_DCLK_DIV;
@@ -303,9 +309,12 @@ index 111111111111..222222222222 100644
303309
+ }
304310
+ }
305311
+
306-
clk_set_rate(vp->dclk, clock);
307-
308-
vop2_post_config(crtc);
312+
+
313+
/*
314+
* Switch to HDMI PHY PLL as DCLK source for display modes up
315+
* to 4K@60Hz, if available, otherwise keep using the system CRU.
316+
*/
317+
if (vop2->pll_hdmiphy0 && clock <= VOP2_MAX_DCLK_RATE) {
309318
@@ -2504,7 +2680,43 @@ static void vop2_crtc_atomic_flush(struct drm_crtc *crtc,
310319
spin_unlock_irq(&crtc->dev->event_lock);
311320
}

0 commit comments

Comments
 (0)