Hi, On Tue, Sep 23, 2025 at 04:26:16PM +0300, Laurent Pinchart wrote: > I wonder if the DRM_MODE_FLAG_P[HV]SYNC flags are always the exact > opposite of DRM_MODE_FLAG_N[HV]SYNC. It's probably fine to assume that > here. A quick grep showed one panel driver setting both the N and P > flags (drivers/gpu/drm/panel/panel-sitronix-st7789v.c, see > t28cp45tn89_mode, which I assume is a bug - Sebastian, could you check > that ?).
Yeah, it was supposed to be static const struct drm_display_mode t28cp45tn89_mode = { ... .flags = DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NHSYNC }; The driver works with the panel, because the driver defaults to DRM_MODE_FLAG_N[HV]SYNC and ignores the related flags, so just the DRM_MODE_FLAG_P[HV]SYNC one is applied: static int st7789v_prepare(struct drm_panel *panel) { ... if (ctx->info->mode->flags & DRM_MODE_FLAG_PVSYNC) polarity |= ST7789V_RGBCTRL_VSYNC_HIGH; if (ctx->info->mode->flags & DRM_MODE_FLAG_PHSYNC) polarity |= ST7789V_RGBCTRL_HSYNC_HIGH; ... } Greetings and thanks for the bug report, -- Sebastian
signature.asc
Description: PGP signature