Skip to content

Commit a5f793e

Browse files
committed
Merge tag 'drm-misc-fixes-2025-04-22' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
Short summary of fixes pull: meson: - Fix VCLK calculation panel: - jd9365a: Fix reset polarity Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20250422151209.GA24823@2a02-2454-fd5e-fd00-5cc9-93f1-8e9a-df9b.dyn6.pyur.net
2 parents 9c32cda + 095c8e6 commit a5f793e

File tree

6 files changed

+128
-117
lines changed

6 files changed

+128
-117
lines changed

drivers/gpu/drm/meson/meson_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static const struct meson_drm_soc_attr meson_drm_soc_attrs[] = {
169169
/* S805X/S805Y HDMI PLL won't lock for HDMI PHY freq > 1,65GHz */
170170
{
171171
.limits = {
172-
.max_hdmi_phy_freq = 1650000,
172+
.max_hdmi_phy_freq = 1650000000,
173173
},
174174
.attrs = (const struct soc_device_attribute []) {
175175
{ .soc_id = "GXL (S805*)", },

drivers/gpu/drm/meson/meson_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct meson_drm_match_data {
3737
};
3838

3939
struct meson_drm_soc_limits {
40-
unsigned int max_hdmi_phy_freq;
40+
unsigned long long max_hdmi_phy_freq;
4141
};
4242

4343
struct meson_drm {

drivers/gpu/drm/meson/meson_encoder_hdmi.c

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ static void meson_encoder_hdmi_set_vclk(struct meson_encoder_hdmi *encoder_hdmi,
7070
{
7171
struct meson_drm *priv = encoder_hdmi->priv;
7272
int vic = drm_match_cea_mode(mode);
73-
unsigned int phy_freq;
74-
unsigned int vclk_freq;
75-
unsigned int venc_freq;
76-
unsigned int hdmi_freq;
73+
unsigned long long phy_freq;
74+
unsigned long long vclk_freq;
75+
unsigned long long venc_freq;
76+
unsigned long long hdmi_freq;
7777

78-
vclk_freq = mode->clock;
78+
vclk_freq = mode->clock * 1000;
7979

8080
/* For 420, pixel clock is half unlike venc clock */
8181
if (encoder_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYYVYY8_0_5X24)
@@ -107,7 +107,8 @@ static void meson_encoder_hdmi_set_vclk(struct meson_encoder_hdmi *encoder_hdmi,
107107
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
108108
venc_freq /= 2;
109109

110-
dev_dbg(priv->dev, "vclk:%d phy=%d venc=%d hdmi=%d enci=%d\n",
110+
dev_dbg(priv->dev,
111+
"vclk:%lluHz phy=%lluHz venc=%lluHz hdmi=%lluHz enci=%d\n",
111112
phy_freq, vclk_freq, venc_freq, hdmi_freq,
112113
priv->venc.hdmi_use_enci);
113114

@@ -122,10 +123,11 @@ static enum drm_mode_status meson_encoder_hdmi_mode_valid(struct drm_bridge *bri
122123
struct meson_encoder_hdmi *encoder_hdmi = bridge_to_meson_encoder_hdmi(bridge);
123124
struct meson_drm *priv = encoder_hdmi->priv;
124125
bool is_hdmi2_sink = display_info->hdmi.scdc.supported;
125-
unsigned int phy_freq;
126-
unsigned int vclk_freq;
127-
unsigned int venc_freq;
128-
unsigned int hdmi_freq;
126+
unsigned long long clock = mode->clock * 1000;
127+
unsigned long long phy_freq;
128+
unsigned long long vclk_freq;
129+
unsigned long long venc_freq;
130+
unsigned long long hdmi_freq;
129131
int vic = drm_match_cea_mode(mode);
130132
enum drm_mode_status status;
131133

@@ -144,12 +146,12 @@ static enum drm_mode_status meson_encoder_hdmi_mode_valid(struct drm_bridge *bri
144146
if (status != MODE_OK)
145147
return status;
146148

147-
return meson_vclk_dmt_supported_freq(priv, mode->clock);
149+
return meson_vclk_dmt_supported_freq(priv, clock);
148150
/* Check against supported VIC modes */
149151
} else if (!meson_venc_hdmi_supported_vic(vic))
150152
return MODE_BAD;
151153

152-
vclk_freq = mode->clock;
154+
vclk_freq = clock;
153155

154156
/* For 420, pixel clock is half unlike venc clock */
155157
if (drm_mode_is_420_only(display_info, mode) ||
@@ -179,7 +181,8 @@ static enum drm_mode_status meson_encoder_hdmi_mode_valid(struct drm_bridge *bri
179181
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
180182
venc_freq /= 2;
181183

182-
dev_dbg(priv->dev, "%s: vclk:%d phy=%d venc=%d hdmi=%d\n",
184+
dev_dbg(priv->dev,
185+
"%s: vclk:%lluHz phy=%lluHz venc=%lluHz hdmi=%lluHz\n",
183186
__func__, phy_freq, vclk_freq, venc_freq, hdmi_freq);
184187

185188
return meson_vclk_vic_supported_freq(priv, phy_freq, vclk_freq);

0 commit comments

Comments
 (0)