drm: Put drm_display_mode on diet
Subsystems (30)
v3 cover drm: Put drm_display_mode on diet
From: Ville Syrjälä <[email protected]>
Rebased mode dieting series. Hopefully will get this past ci finally.
Changes from v2:
- rebase
- dropped the int->u8 private_flags patch
Only the last patch remains unreviewed.
Ville Syrjälä (16):
drm: Nuke mode->hsync
drm/i915: Introduce some local intel_dp variables
drm: Nuke mode->vrefresh
drm/msm/dpu: Stop copying around mode->private_flags
drm: Shrink {width,height}_mm to u16
drm: Shrink mode->type to u8
drm: Make mode->flags u32
drm: Shrink drm_display_mode timings
drm: Flatten drm_mode_vrefresh()
drm: pahole struct drm_display_mode
drm/mcde: Use mode->clock instead of reverse calculating it from the
vrefresh
drm/i915: Stop using mode->private_flags
drm/i915: Replace I915_MODE_FLAG_INHERITED with a boolean drm/gma500: Stop using mode->private_flags
drm: Nuke mode->private_flags
drm: Replace mode->export_head with a boolean
Documentation/gpu/todo.rst | 32 -- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/drm_client_modeset.c | 2 +- drivers/gpu/drm/drm_connector.c | 45 ++- drivers/gpu/drm/drm_edid.c | 336 +++++++++--------- drivers/gpu/drm/drm_modes.c | 66 +--- drivers/gpu/drm/drm_probe_helper.c | 3 - drivers/gpu/drm/exynos/exynos_hdmi.c | 5 +- drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- drivers/gpu/drm/gma500/psb_intel_drv.h | 19 - drivers/gpu/drm/gma500/psb_intel_sdvo.c | 11 +- drivers/gpu/drm/i2c/ch7006_mode.c | 1 - drivers/gpu/drm/i915/display/icl_dsi.c | 13 +- drivers/gpu/drm/i915/display/intel_atomic.c | 1 + drivers/gpu/drm/i915/display/intel_audio.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 27 +- .../drm/i915/display/intel_display_debugfs.c | 4 +- .../drm/i915/display/intel_display_types.h | 11 +- drivers/gpu/drm/i915/display/intel_dp.c | 24 +- drivers/gpu/drm/i915/display/intel_tv.c | 7 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 6 +- drivers/gpu/drm/i915/i915_irq.c | 4 +- drivers/gpu/drm/mcde/mcde_dsi.c | 7 +- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 4 +- drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- drivers/gpu/drm/meson/meson_venc_cvbs.c | 2 - drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 29 +- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 10 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 5 +- drivers/gpu/drm/panel/panel-arm-versatile.c | 4 - drivers/gpu/drm/panel/panel-boe-himax8279d.c | 3 +- .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 7 +- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 3 +- .../gpu/drm/panel/panel-feixin-k101-im2ba02.c | 3 +- .../drm/panel/panel-feiyang-fy07024di26a30d.c | 3 +- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 7 - drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 3 +- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 4 +- .../gpu/drm/panel/panel-jdi-lt070me05000.c | 3 +- .../drm/panel/panel-kingdisplay-kd097d04.c | 3 +- .../drm/panel/panel-leadtek-ltk500hd1829.c | 3 +- drivers/gpu/drm/panel/panel-lg-lb035q02.c | 1 - drivers/gpu/drm/panel/panel-lg-lg4573.c | 3 +- drivers/gpu/drm/panel/panel-nec-nl8048hl11.c | 1 - drivers/gpu/drm/panel/panel-novatek-nt35510.c | 1 - drivers/gpu/drm/panel/panel-novatek-nt39016.c | 2 - .../drm/panel/panel-olimex-lcd-olinuxino.c | 1 - .../gpu/drm/panel/panel-orisetech-otm8009a.c | 3 +- .../drm/panel/panel-osd-osd101t2587-53ts.c | 3 +- .../drm/panel/panel-panasonic-vvx10f034n00.c | 3 +- .../drm/panel/panel-raspberrypi-touchscreen.c | 4 +- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 3 +- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 3 +- .../drm/panel/panel-rocktech-jh057n00900.c | 5 +- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 1 - drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 6 - drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 4 +- .../gpu/drm/panel/panel-samsung-s6e63j0x03.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 3 +- .../panel/panel-samsung-s6e88a0-ams452ef01.c | 1 - drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 3 +- .../gpu/drm/panel/panel-sharp-lq101r1sx01.c | 3 +- .../gpu/drm/panel/panel-sharp-ls037v7dw01.c | 1 - .../gpu/drm/panel/panel-sharp-ls043t1le01.c | 3 +- drivers/gpu/drm/panel/panel-simple.c | 91 +---- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 2 +- .../gpu/drm/panel/panel-sitronix-st7789v.c | 3 +- drivers/gpu/drm/panel/panel-sony-acx424akp.c | 2 - drivers/gpu/drm/panel/panel-sony-acx565akm.c | 1 - drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 1 - drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 1 - drivers/gpu/drm/panel/panel-tpo-tpg110.c | 5 - drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 - .../gpu/drm/panel/panel-xinpeng-xpp055c272.c | 3 +- drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 - include/drm/drm_modes.h | 208 +++++------ 77 files changed, 415 insertions(+), 695 deletions(-)
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 1/16 drm: Nuke mode->hsync
From: Ville Syrjälä <[email protected]>
Let's just calculate the hsync rate on demand. No point in wasting space storing it and risking the cached value getting out of sync with reality.
v2: Move drm_mode_hsync() next to its only users
Drop the TODO
--- Documentation/gpu/todo.rst | 12 --------- drivers/gpu/drm/drm_edid.c | 8 ++++++ drivers/gpu/drm/drm_modes.c | 26 -------------------- drivers/gpu/drm/i915/display/intel_display.c | 1 - include/drm/drm_modes.h | 11 --------- 5 files changed, 8 insertions(+), 50 deletions(-)
Documentation/gpu/todo.rst +0 -12
@@ -347,18 +347,6 @@ Contact: Sean Paul Level: Starter -Remove drm_display_mode.hsync ------------------------------ - -We have drm_mode_hsync() to calculate this from hsync_start/end, since drivers -shouldn't/don't use this, remove this member to avoid any temptations to use it -in the future. If there is any debug code using drm_display_mode.hsync, convert -it to use drm_mode_hsync() instead. - -Contact: Sean Paul - -Level: Starter - connector register/unregister fixes -----------------------------------
drivers/gpu/drm/drm_edid.c +8 -0
@@ -2380,6 +2380,14 @@ bad_std_timing(u8 a, u8 b) (a ==0x20 && b ==0x20 ); } +static int drm_mode_hsync (const struct drm_display_mode *mode) +{ +if (mode->htotal <=0 ) +return 0 ; + +return DIV_ROUND_CLOSEST (mode->clock, mode->htotal); +} +/** * drm_mode_std - convert standard mode info (width, height, refresh) into mode * @connector: connector of for the EDID block
drivers/gpu/drm/drm_modes.c +0 -26
@@ -747,32 +747,6 @@ void drm_mode_set_name(struct drm_display_mode *mode) }EXPORT_SYMBOL (drm_mode_set_name); -/** -* drm_mode_hsync - get the hsync of a mode -* @mode: mode -* -* Returns: -* @modes's hsync rate in kHz, rounded to the nearest integer. Calculates the -* value first if it is not yet set. -*/ -int drm_mode_hsync (const struct drm_display_mode *mode) -{ -unsigned int calc_val; - -if (mode->hsync) -return mode->hsync; - -if (mode->htotal <=0 ) -return 0 ; - - calc_val = (mode->clock *1000 ) / mode->htotal;/* hsync in Hz */ - calc_val +=500 ;/* round to 1000Hz */ - calc_val /=1000 ;/* truncate to kHz */ - -return calc_val; -} -EXPORT_SYMBOL (drm_mode_hsync); -/** * drm_mode_vrefresh - get the vrefresh of a mode * @mode: mode
drivers/gpu/drm/i915/display/intel_display.c +0 -1
@@ -8886,7 +8886,6 @@ void intel_mode_from_pipe_config(struct drm_display_mode *mode, mode->clock = pipe_config->hw.adjusted_mode.crtc_clock; - mode->hsync =drm_mode_hsync (mode); mode->vrefresh =drm_mode_vrefresh (mode);drm_mode_set_name (mode); }
include/drm/drm_modes.h +0 -11
@@ -390,16 +390,6 @@ struct drm_display_mode {*/ int vrefresh; -/** -* @hsync: -* -* Horizontal refresh rate, for debug output in human readable form. Not -* used in a functional way. -* -* This value is in kHz. -*/ -int hsync; -/** * @picture_aspect_ratio: *
@@ -493,7 +483,6 @@ int of_get_drm_display_mode(struct device_node *np, int index);void drm_mode_set_name (struct drm_display_mode *mode); -int drm_mode_hsync (const struct drm_display_mode *mode);int drm_mode_vrefresh (const struct drm_display_mode *mode);void drm_mode_get_hv_timing (const struct drm_display_mode *mode,int *hdisplay,int *vdisplay);
Signature · 6 lines
2.24.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 2/16 drm/i915: Introduce some local intel_dp variables
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
The drrs code dereferences mode->vrefresh via some really long chain of structures/pointers. Couldn't get coccinelle to see through all that so let's add some local variables to help it.
--- drivers/gpu/drm/i915/display/intel_dp.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +12 -6
@@ -8002,6 +8002,7 @@ static void intel_edp_drrs_downclock_work(struct work_struct *work)void intel_edp_drrs_invalidate (struct drm_i915_private *dev_priv,unsigned int frontbuffer_bits) { +struct intel_dp *intel_dp;struct drm_crtc *crtc;enum pipe pipe;
@@ -8011,12 +8012,14 @@ void intel_edp_drrs_invalidate(struct drm_i915_private *dev_priv,cancel_delayed_work (&dev_priv->drrs.work);mutex_lock (&dev_priv->drrs.mutex); -if (!dev_priv->drrs.dp) { + + intel_dp = dev_priv->drrs.dp; +if (!intel_dp) {mutex_unlock (&dev_priv->drrs.mutex);return ; } - crtc =dp_to_dig_port (dev_priv->drrs.dp)->base.base.crtc; + crtc =dp_to_dig_port (intel_dp)->base.base.crtc; pipe =to_intel_crtc (crtc)->pipe; frontbuffer_bits &=INTEL_FRONTBUFFER_ALL_MASK (pipe);
@@ -8025,7 +8028,7 @@ void intel_edp_drrs_invalidate(struct drm_i915_private *dev_priv,/* invalidate means busy screen hence upclock */ if (frontbuffer_bits && dev_priv->drrs.refresh_rate_type ==DRRS_LOW_RR )intel_dp_set_drrs_state (dev_priv,to_intel_crtc (crtc)->config, - dev_priv->drrs.dp->attached_connector->panel.fixed_mode->vrefresh); + intel_dp->attached_connector->panel.fixed_mode->vrefresh);mutex_unlock (&dev_priv->drrs.mutex); }
@@ -8045,6 +8048,7 @@ void intel_edp_drrs_invalidate(struct drm_i915_private *dev_priv,void intel_edp_drrs_flush (struct drm_i915_private *dev_priv,unsigned int frontbuffer_bits) { +struct intel_dp *intel_dp;struct drm_crtc *crtc;enum pipe pipe;
@@ -8054,12 +8058,14 @@ void intel_edp_drrs_flush(struct drm_i915_private *dev_priv,cancel_delayed_work (&dev_priv->drrs.work);mutex_lock (&dev_priv->drrs.mutex); -if (!dev_priv->drrs.dp) { + + intel_dp = dev_priv->drrs.dp; +if (!intel_dp) {mutex_unlock (&dev_priv->drrs.mutex);return ; } - crtc =dp_to_dig_port (dev_priv->drrs.dp)->base.base.crtc; + crtc =dp_to_dig_port (intel_dp)->base.base.crtc; pipe =to_intel_crtc (crtc)->pipe; frontbuffer_bits &=INTEL_FRONTBUFFER_ALL_MASK (pipe);
@@ -8068,7 +8074,7 @@ void intel_edp_drrs_flush(struct drm_i915_private *dev_priv,/* flush means busy screen hence upclock */ if (frontbuffer_bits && dev_priv->drrs.refresh_rate_type ==DRRS_LOW_RR )intel_dp_set_drrs_state (dev_priv,to_intel_crtc (crtc)->config, - dev_priv->drrs.dp->attached_connector->panel.fixed_mode->vrefresh); + intel_dp->attached_connector->panel.fixed_mode->vrefresh);/* * flush also means no more activity hence schedule downclock, if all
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 3/16 drm: Nuke mode->vrefresh
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Get rid of mode->vrefresh and just calculate it on demand. Saves a bit of space and avoids the cached value getting out of sync with reality.
Mostly done with cocci, with the following manual fixups:
- Remove the now empty loop in drm_helper_probe_single_connector_modes()
- Fix __MODE() macro in ch7006_mode.c
- Fix DRM_MODE_ARG() macro in drm_modes.h
- Remove leftover comment from samsung_s6d16d0_mode
- Drop the TODO
@@
@@
struct drm_display_mode {
...
- int vrefresh;
...
};@@
identifier N;
expression E;
@@
struct drm_display_mode N = {
- .vrefresh = E
};
@@
identifier N;
expression E;
@@
struct drm_display_mode N[...] = {
...,
{
- .vrefresh = E
}
,...
};
@@
expression E;
@@
{
DRM_MODE(...),- .vrefresh = E,
}
@@
identifier M, R;
@@
int drm_mode_vrefresh(const struct drm_display_mode *M) {
...
- if (M->vrefresh > 0)
- R = M->vrefresh;
- else
if (...) {
...
}
...
}
@@
struct drm_display_mode *p;
expression E;
@@
(
- p->vrefresh = E;
|
- p->vrefresh
+ drm_mode_vrefresh(p)
)
@@
struct drm_display_mode s;
expression E;
@@
(
- s.vrefresh = E;
|
- s.vrefresh
+ drm_mode_vrefresh(&s)
)
@@
expression E;
@@
- drm_mode_vrefresh(E) ? drm_mode_vrefresh(E) : drm_mode_vrefresh(E)
+ drm_mode_vrefresh(E)
@find_substruct@
identifier X;
identifier S;
@@
struct X {
...
struct drm_display_mode S;
...
};
@@
identifier find_substruct.S;
expression E;
identifier I;
@@
{
.S = {
- .vrefresh = E
}
}
@@
identifier find_substruct.S;
identifier find_substruct.X;
expression E;
identifier I;
@@
struct X I[...] = {
...,
.S = {
- .vrefresh = E
}
,...
};
v2: Drop TODO
v3: Rebase
--- Documentation/gpu/todo.rst | 20 -- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/drm_client_modeset.c | 2 +- drivers/gpu/drm/drm_edid.c | 328 +++++++++--------- drivers/gpu/drm/drm_modes.c | 9 +- drivers/gpu/drm/drm_probe_helper.c | 3 - drivers/gpu/drm/exynos/exynos_hdmi.c | 5 +- drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- drivers/gpu/drm/i2c/ch7006_mode.c | 1 - drivers/gpu/drm/i915/display/intel_audio.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 1 - .../drm/i915/display/intel_display_debugfs.c | 4 +- drivers/gpu/drm/i915/display/intel_dp.c | 10 +- drivers/gpu/drm/i915/display/intel_tv.c | 3 - drivers/gpu/drm/mcde/mcde_dsi.c | 6 +- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 4 +- drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- drivers/gpu/drm/meson/meson_venc_cvbs.c | 2 - drivers/gpu/drm/nouveau/nouveau_connector.c | 5 +- drivers/gpu/drm/panel/panel-arm-versatile.c | 4 - drivers/gpu/drm/panel/panel-boe-himax8279d.c | 3 +- .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 7 +- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 3 +- .../gpu/drm/panel/panel-feixin-k101-im2ba02.c | 3 +- .../drm/panel/panel-feiyang-fy07024di26a30d.c | 3 +- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 7 - drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 3 +- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 4 +- .../gpu/drm/panel/panel-jdi-lt070me05000.c | 3 +- .../drm/panel/panel-kingdisplay-kd097d04.c | 3 +- .../drm/panel/panel-leadtek-ltk500hd1829.c | 3 +- drivers/gpu/drm/panel/panel-lg-lb035q02.c | 1 - drivers/gpu/drm/panel/panel-lg-lg4573.c | 3 +- drivers/gpu/drm/panel/panel-nec-nl8048hl11.c | 1 - drivers/gpu/drm/panel/panel-novatek-nt35510.c | 1 - drivers/gpu/drm/panel/panel-novatek-nt39016.c | 2 - .../drm/panel/panel-olimex-lcd-olinuxino.c | 1 - .../gpu/drm/panel/panel-orisetech-otm8009a.c | 3 +- .../drm/panel/panel-osd-osd101t2587-53ts.c | 3 +- .../drm/panel/panel-panasonic-vvx10f034n00.c | 3 +- .../drm/panel/panel-raspberrypi-touchscreen.c | 4 +- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 3 +- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 3 +- .../drm/panel/panel-rocktech-jh057n00900.c | 5 +- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 1 - drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 6 - drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 4 +- .../gpu/drm/panel/panel-samsung-s6e63j0x03.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 3 +- .../panel/panel-samsung-s6e88a0-ams452ef01.c | 1 - drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 3 +- .../gpu/drm/panel/panel-sharp-lq101r1sx01.c | 3 +- .../gpu/drm/panel/panel-sharp-ls037v7dw01.c | 1 - .../gpu/drm/panel/panel-sharp-ls043t1le01.c | 3 +- drivers/gpu/drm/panel/panel-simple.c | 91 +---- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 2 +- .../gpu/drm/panel/panel-sitronix-st7789v.c | 3 +- drivers/gpu/drm/panel/panel-sony-acx424akp.c | 2 - drivers/gpu/drm/panel/panel-sony-acx565akm.c | 1 - drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 1 - drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 1 - drivers/gpu/drm/panel/panel-tpo-tpg110.c | 5 - drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 - .../gpu/drm/panel/panel-xinpeng-xpp055c272.c | 3 +- drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 - include/drm/drm_modes.h | 12 +- 67 files changed, 219 insertions(+), 424 deletions(-)
Documentation/gpu/todo.rst +0 -20
@@ -327,26 +327,6 @@ Contact: Laurent Pinchart, Daniel Vetter Level: Intermediate (mostly because it is a huge tasks without good partial milestones, not technically itself that challenging) -Convert direct mode.vrefresh accesses to use drm_mode_vrefresh() ----------------------------------------------------------------- - -drm_display_mode.vrefresh isn't guaranteed to be populated. As such, using it -is risky and has been known to cause div-by-zero bugs. Fortunately, drm core -has helper which will use mode.vrefresh if it's !0 and will calculate it from -the timings when it's 0. - -Use simple search/replace, or (more fun) cocci to replace instances of direct -vrefresh access with a call to the helper. Check out -https://lists.freedesktop.org/archives/dri-devel/2019-January/205186.html for -inspiration. - -Once all instances of vrefresh have been converted, remove vrefresh from -drm_display_mode to avoid future use. - -Contact: Sean Paul - -Level: Starter - connector register/unregister fixes -----------------------------------
drivers/gpu/drm/bridge/sii902x.c +1 -1
@@ -360,7 +360,7 @@ static void sii902x_bridge_mode_set(struct drm_bridge *bridge, buf[0 ] = pixel_clock_10kHz &0xff ; buf[1 ] = pixel_clock_10kHz >>8 ; - buf[2 ] = adj->vrefresh; + buf[2 ] =drm_mode_vrefresh (adj); buf[3 ] =0x00 ; buf[4 ] = adj->hdisplay; buf[5 ] = adj->hdisplay >>8 ;
drivers/gpu/drm/drm_client_modeset.c +1 -1
@@ -186,7 +186,7 @@ drm_connector_pick_cmdline_mode(struct drm_connector *connector)continue ;if (cmdline_mode->refresh_specified) { -if (mode->vrefresh != cmdline_mode->refresh) +if (drm_mode_vrefresh (mode) != cmdline_mode->refresh)continue ; }
drivers/gpu/drm/drm_edid.c +161 -167
1,024 lines not on this page · raw message
drivers/gpu/drm/drm_modes.c +3 -6
@@ -759,9 +759,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode) {int refresh =0 ; -if (mode->vrefresh >0 ) - refresh = mode->vrefresh; -else if (mode->htotal >0 && mode->vtotal >0 ) { +if (mode->htotal >0 && mode->vtotal >0 ) {unsigned int num, den; num = mode->clock *1000 ;
@@ -1308,7 +1306,7 @@ static int drm_mode_compare(void *priv, struct list_head *lh_a, struct list_headif (diff)return diff; - diff = b->vrefresh - a->vrefresh; + diff =drm_mode_vrefresh (b) -drm_mode_vrefresh (a);if (diff)return diff;
@@ -1921,7 +1919,7 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out, out->vsync_end = in->vsync_end; out->vtotal = in->vtotal; out->vscan = in->vscan; - out->vrefresh = in->vrefresh; + out->vrefresh =drm_mode_vrefresh (in); out->flags = in->flags; out->type = in->type;
@@ -1981,7 +1979,6 @@ int drm_mode_convert_umode(struct drm_device *dev, out->vsync_end = in->vsync_end; out->vtotal = in->vtotal; out->vscan = in->vscan; - out->vrefresh = in->vrefresh; out->flags = in->flags;/* * Old xf86-video-vmware (possibly others too) used to
drivers/gpu/drm/drm_probe_helper.c +0 -3
@@ -532,9 +532,6 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,if (list_empty (&connector->modes))return 0 ; -list_for_each_entry (mode, &connector->modes, head) - mode->vrefresh =drm_mode_vrefresh (mode); -drm_mode_sort (&connector->modes); DRM_DEBUG_KMS("[CONNECTOR:%d:%s] probed modes :\n", connector->base.id,
drivers/gpu/drm/exynos/exynos_hdmi.c +3 -2
@@ -921,7 +921,8 @@ static int hdmi_mode_valid(struct drm_connector *connector,DRM_DEV_DEBUG_KMS (hdata->dev,"xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n" , - mode->hdisplay, mode->vdisplay, mode->vrefresh, + mode->hdisplay, mode->vdisplay, +drm_mode_vrefresh (mode), (mode->flags &DRM_MODE_FLAG_INTERLACE ) ? true : false, mode->clock *1000 );
@@ -1020,7 +1021,7 @@ static bool hdmi_mode_fixup(struct drm_encoder *encoder,DRM_DEV_DEBUG_KMS (dev->dev,"Adjusted Mode: [%d]x[%d] [%d]Hz\n" , m->hdisplay, m->vdisplay, - m->vrefresh); +drm_mode_vrefresh (m));drm_mode_copy (adjusted_mode, m);break ;
drivers/gpu/drm/exynos/exynos_mixer.c +1 -1
@@ -1046,7 +1046,7 @@ static int mixer_mode_valid(struct exynos_drm_crtc *crtc,u32 w = mode->hdisplay, h = mode->vdisplay;DRM_DEV_DEBUG_KMS (ctx->dev,"xres=%d, yres=%d, refresh=%d, intl=%d\n" , - w, h, mode->vrefresh, + w, h,drm_mode_vrefresh (mode), !!(mode->flags &DRM_MODE_FLAG_INTERLACE ));if (ctx->mxr_ver ==MXR_VER_128_0_0_184 )
drivers/gpu/drm/i2c/ch7006_mode.c +0 -1
@@ -121,7 +121,6 @@ const struct ch7006_tv_norm_info ch7006_tv_norms[] = { .vscan = 0, \ .flags = DRM_MODE_FLAG_##hsynp##HSYNC | \ DRM_MODE_FLAG_##vsynp##VSYNC, \ - .vrefresh = 0, \ }, \ .enc_hdisp = e_hd, \ .enc_vdisp = e_vd, \
drivers/gpu/drm/i915/display/intel_audio.c +1 -1
@@ -531,7 +531,7 @@ static unsigned int get_hblank_early_enable_config(struct intel_encoder *encoder h_total = crtc_state->hw.adjusted_mode.crtc_htotal; v_total = crtc_state->hw.adjusted_mode.crtc_vtotal; pixel_clk = crtc_state->hw.adjusted_mode.crtc_clock; - refresh_rate = crtc_state->hw.adjusted_mode.vrefresh; + refresh_rate =drm_mode_vrefresh (&crtc_state->hw.adjusted_mode); vdsc_bpp = crtc_state->dsc.compressed_bpp; cdclk = i915->cdclk.hw.cdclk;/* fec= 0.972261, using rounding multiplier of 1000000 */
drivers/gpu/drm/i915/display/intel_display.c +0 -1
@@ -8886,7 +8886,6 @@ void intel_mode_from_pipe_config(struct drm_display_mode *mode, mode->clock = pipe_config->hw.adjusted_mode.crtc_clock; - mode->vrefresh =drm_mode_vrefresh (mode);drm_mode_set_name (mode); }
drivers/gpu/drm/i915/display/intel_display_debugfs.c +2 -2
@@ -1099,10 +1099,10 @@ static void drrs_status_per_crtc(struct seq_file *m,seq_puts (m,"\n\t\t" );if (drrs->refresh_rate_type ==DRRS_HIGH_RR ) {seq_puts (m,"DRRS_State: DRRS_HIGH_RR\n" ); - vrefresh = panel->fixed_mode->vrefresh; + vrefresh =drm_mode_vrefresh (panel->fixed_mode); }else if (drrs->refresh_rate_type ==DRRS_LOW_RR ) {seq_puts (m,"DRRS_State: DRRS_LOW_RR\n" ); - vrefresh = panel->downclock_mode->vrefresh; + vrefresh =drm_mode_vrefresh (panel->downclock_mode); }else {seq_printf (m,"DRRS_State: Unknown(%d)\n" , drrs->refresh_rate_type);
drivers/gpu/drm/i915/display/intel_dp.c +5 -5
@@ -7836,7 +7836,7 @@ static void intel_dp_set_drrs_state(struct drm_i915_private *dev_priv,return ; } -if (intel_dp->attached_connector->panel.downclock_mode->vrefresh == +if (drm_mode_vrefresh (intel_dp->attached_connector->panel.downclock_mode) == refresh_rate) index =DRRS_LOW_RR ;
@@ -7949,7 +7949,7 @@ void intel_edp_drrs_disable(struct intel_dp *intel_dp,if (dev_priv->drrs.refresh_rate_type ==DRRS_LOW_RR )intel_dp_set_drrs_state (dev_priv, old_crtc_state, - intel_dp->attached_connector->panel.fixed_mode->vrefresh); +drm_mode_vrefresh (intel_dp->attached_connector->panel.fixed_mode)); dev_priv->drrs.dp =NULL ;mutex_unlock (&dev_priv->drrs.mutex);
@@ -7982,7 +7982,7 @@ static void intel_edp_drrs_downclock_work(struct work_struct *work)struct drm_crtc *crtc =dp_to_dig_port (intel_dp)->base.base.crtc;intel_dp_set_drrs_state (dev_priv,to_intel_crtc (crtc)->config, - intel_dp->attached_connector->panel.downclock_mode->vrefresh); +drm_mode_vrefresh (intel_dp->attached_connector->panel.downclock_mode)); } unlock:
@@ -8028,7 +8028,7 @@ void intel_edp_drrs_invalidate(struct drm_i915_private *dev_priv,/* invalidate means busy screen hence upclock */ if (frontbuffer_bits && dev_priv->drrs.refresh_rate_type ==DRRS_LOW_RR )intel_dp_set_drrs_state (dev_priv,to_intel_crtc (crtc)->config, - intel_dp->attached_connector->panel.fixed_mode->vrefresh); +drm_mode_vrefresh (intel_dp->attached_connector->panel.fixed_mode));mutex_unlock (&dev_priv->drrs.mutex); }
@@ -8074,7 +8074,7 @@ void intel_edp_drrs_flush(struct drm_i915_private *dev_priv,/* flush means busy screen hence upclock */ if (frontbuffer_bits && dev_priv->drrs.refresh_rate_type ==DRRS_LOW_RR )intel_dp_set_drrs_state (dev_priv,to_intel_crtc (crtc)->config, - intel_dp->attached_connector->panel.fixed_mode->vrefresh); +drm_mode_vrefresh (intel_dp->attached_connector->panel.fixed_mode));/* * flush also means no more activity hence schedule downclock, if all
drivers/gpu/drm/i915/display/intel_tv.c +0 -3
@@ -1038,9 +1038,6 @@ intel_tv_mode_to_mode(struct drm_display_mode *mode,/* TV has it's own notion of sync and other mode flags, so clear them. */ mode->flags =0 ; - mode->vrefresh =0 ; - mode->vrefresh =drm_mode_vrefresh (mode); - snprintf(mode->name, sizeof(mode->name), "%dx%d%c (%s)", mode->hdisplay, mode->vdisplay,
drivers/gpu/drm/mcde/mcde_dsi.c +3 -3
@@ -538,7 +538,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,*/ /* (ps/s) / (pixels/s) = ps/pixels */ pclk =DIV_ROUND_UP_ULL (1000000000000 , - (mode->vrefresh * mode->htotal * mode->vtotal)); + (drm_mode_vrefresh (mode) * mode->htotal * mode->vtotal));dev_dbg (d->dev,"picoseconds between two pixels: %llu\n" , pclk);
@@ -568,7 +568,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d, bpl *= d->mdsi->lanes;dev_dbg (d->dev,"calculated bytes per line: %llu @ %d Hz with HS %lu Hz\n" , - bpl, mode->vrefresh, d->mdsi->hs_rate); + bpl,drm_mode_vrefresh (mode), d->mdsi->hs_rate);/* * 6 is header + checksum, header = 4 bytes, checksum = 2 bytes
@@ -644,7 +644,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,dev_err (d->dev,"video block does not fit on line!\n" );dev_err (d->dev,"calculated bytes per line: %llu @ %d Hz\n" , - bpl, mode->vrefresh); + bpl,drm_mode_vrefresh (mode));dev_err (d->dev,"bytes per line (blkline_pck) %u bytes\n" , blkline_pck);
drivers/gpu/drm/mediatek/mtk_drm_crtc.c +2 -2
@@ -164,7 +164,7 @@ static void mtk_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) state->pending_width = crtc->mode.hdisplay; state->pending_height = crtc->mode.vdisplay; - state->pending_vrefresh = crtc->mode.vrefresh; + state->pending_vrefresh =drm_mode_vrefresh (&crtc->mode);wmb ();/* Make sure the above parameters are set before update */ state->pending_config = true; }
@@ -263,7 +263,7 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc) width = crtc->state->adjusted_mode.hdisplay; height = crtc->state->adjusted_mode.vdisplay; - vrefresh = crtc->state->adjusted_mode.vrefresh; + vrefresh =drm_mode_vrefresh (&crtc->state->adjusted_mode);drm_for_each_encoder (encoder, crtc->dev) {if (encoder->crtc != crtc)
drivers/gpu/drm/mediatek/mtk_hdmi.c +1 -1
@@ -1258,7 +1258,7 @@ static int mtk_hdmi_conn_mode_valid(struct drm_connector *conn,struct drm_bridge *next_bridge;dev_dbg (hdmi->dev,"xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n" , - mode->hdisplay, mode->vdisplay, mode->vrefresh, + mode->hdisplay, mode->vdisplay,drm_mode_vrefresh (mode), !!(mode->flags &DRM_MODE_FLAG_INTERLACE ), mode->clock *1000 ); next_bridge =drm_bridge_get_next_bridge (&hdmi->bridge);
drivers/gpu/drm/meson/meson_venc_cvbs.c +0 -2
@@ -48,7 +48,6 @@ struct meson_cvbs_mode meson_cvbs_modes[MESON_CVBS_MODES_COUNT] = {DRM_MODE ("720x576i" ,DRM_MODE_TYPE_DRIVER ,13500 ,720 ,732 ,795 ,864 ,0 ,576 ,580 ,586 ,625 ,0 , DRM_MODE_FLAG_INTERLACE), - .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, }, },
@@ -58,7 +57,6 @@ struct meson_cvbs_mode meson_cvbs_modes[MESON_CVBS_MODES_COUNT] = {DRM_MODE ("720x480i" ,DRM_MODE_TYPE_DRIVER ,13500 ,720 ,739 ,801 ,858 ,0 ,480 ,488 ,494 ,525 ,0 , DRM_MODE_FLAG_INTERLACE), - .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, }, },
drivers/gpu/drm/nouveau/nouveau_connector.c +2 -3
@@ -59,7 +59,6 @@ nouveau_conn_native_mode(struct drm_connector *connector)int high_w =0 , high_h =0 , high_v =0 ;list_for_each_entry (mode, &connector->probed_modes, head) { - mode->vrefresh =drm_mode_vrefresh (mode);if (helper->mode_valid (connector, mode) !=MODE_OK || (mode->flags &DRM_MODE_FLAG_INTERLACE ))continue ;
@@ -80,12 +79,12 @@ nouveau_conn_native_mode(struct drm_connector *connector)continue ;if (mode->hdisplay == high_w && mode->vdisplay == high_h && - mode->vrefresh < high_v) +drm_mode_vrefresh (mode) < high_v)continue ; high_w = mode->hdisplay; high_h = mode->vdisplay; - high_v = mode->vrefresh; + high_v =drm_mode_vrefresh (mode); largest = mode; }
drivers/gpu/drm/panel/panel-arm-versatile.c +0 -4
@@ -143,7 +143,6 @@ static const struct versatile_panel_type versatile_panels[] = { .vsync_start = 240 + 5, .vsync_end = 240 + 5 + 6, .vtotal = 240 + 5 + 6 + 5, - .vrefresh = 116, .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, }, },
@@ -167,7 +166,6 @@ static const struct versatile_panel_type versatile_panels[] = { .vsync_start = 480 + 11, .vsync_end = 480 + 11 + 2, .vtotal = 480 + 11 + 2 + 32, - .vrefresh = 60, .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, }, },
@@ -190,7 +188,6 @@ static const struct versatile_panel_type versatile_panels[] = { .vsync_start = 220 + 0, .vsync_end = 220 + 0 + 2, .vtotal = 220 + 0 + 2 + 1, - .vrefresh = 390, .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, }, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
@@ -214,7 +211,6 @@ static const struct versatile_panel_type versatile_panels[] = { .vsync_start = 320 + 2, .vsync_end = 320 + 2 + 2, .vtotal = 320 + 2 + 2 + 2, - .vrefresh = 116, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, }, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
drivers/gpu/drm/panel/panel-boe-himax8279d.c +1 -2
@@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel, mode =drm_mode_duplicate (connector->dev, m);if (!mode) {DRM_DEV_ERROR (pinfo->base.dev,"failed to add mode %ux%u@%u\n" , - m->hdisplay, m->vdisplay, m->vrefresh); + m->hdisplay, m->vdisplay,drm_mode_vrefresh (m));return -ENOMEM ; }
@@ -262,7 +262,6 @@ static const struct drm_display_mode default_display_mode = { .vsync_start = 1920 + 10, .vsync_end = 1920 + 10 + 14, .vtotal = 1920 + 10 + 14 + 4, - .vrefresh = 60, };/* 8 inch */
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +1 -6
@@ -594,7 +594,6 @@ static const struct drm_display_mode boe_tv101wum_nl6_default_mode = { .vsync_start = 1920 + 10, .vsync_end = 1920 + 10 + 14, .vtotal = 1920 + 10 + 14 + 4, - .vrefresh = 60, };static const struct panel_desc boe_tv101wum_nl6_desc = {
@@ -622,7 +621,6 @@ static const struct drm_display_mode auo_kd101n80_45na_default_mode = { .vsync_start = 1920 + 16, .vsync_end = 1920 + 16 + 4, .vtotal = 1920 + 16 + 4 + 16, - .vrefresh = 60, };static const struct panel_desc auo_kd101n80_45na_desc = {
@@ -650,7 +648,6 @@ static const struct drm_display_mode boe_tv101wum_n53_default_mode = { .vsync_start = 1920 + 20, .vsync_end = 1920 + 20 + 4, .vtotal = 1920 + 20 + 4 + 10, - .vrefresh = 60, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, };
@@ -678,7 +675,6 @@ static const struct drm_display_mode auo_b101uan08_3_default_mode = { .vsync_start = 1920 + 34, .vsync_end = 1920 + 34 + 2, .vtotal = 1920 + 34 + 2 + 24, - .vrefresh = 60, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, };
@@ -706,7 +702,6 @@ static const struct drm_display_mode boe_tv105wum_nw0_default_mode = { .vsync_start = 1920 + 10, .vsync_end = 1920 + 10 + 2, .vtotal = 1920 + 10 + 2 + 14, - .vrefresh = 60, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, };
@@ -734,7 +729,7 @@ static int boe_panel_get_modes(struct drm_panel *panel, mode =drm_mode_duplicate (connector->dev, m);if (!mode) {dev_err (panel->dev,"failed to add mode %ux%u@%u\n" , - m->hdisplay, m->vdisplay, m->vrefresh); + m->hdisplay, m->vdisplay,drm_mode_vrefresh (m));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-elida-kd35t133.c +1 -2
@@ -197,7 +197,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 480 + 2, .vsync_end = 480 + 2 + 1, .vtotal = 480 + 2 + 1 + 2, - .vrefresh = 60, .clock = 17000, .width_mm = 42, .height_mm = 82,
@@ -213,7 +212,7 @@ static int kd35t133_get_modes(struct drm_panel *panel,if (!mode) {DRM_DEV_ERROR (ctx->dev,"Failed to add mode %ux%u@%u\n" , default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); +drm_mode_vrefresh (&default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c +1 -2
@@ -392,7 +392,6 @@ static int k101_im2ba02_unprepare(struct drm_panel *panel)static const struct drm_display_mode k101_im2ba02_default_mode = { .clock =70000 , - .vrefresh =60 , .hdisplay =800 , .hsync_start =800 +20 ,
@@ -420,7 +419,7 @@ static int k101_im2ba02_get_modes(struct drm_panel *panel,DRM_DEV_ERROR (&ctx->dsi->dev,"failed to add mode %ux%ux@%u\n" , k101_im2ba02_default_mode.hdisplay, k101_im2ba02_default_mode.vdisplay, - k101_im2ba02_default_mode.vrefresh); +drm_mode_vrefresh (&k101_im2ba02_default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c +1 -2
@@ -153,7 +153,6 @@ static const struct drm_display_mode feiyang_default_mode = { .vsync_start = 600 + 12, .vsync_end = 600 + 12 + 2, .vtotal = 600 + 12 + 2 + 21, - .vrefresh = 60, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, };
@@ -169,7 +168,7 @@ static int feiyang_get_modes(struct drm_panel *panel,DRM_DEV_ERROR (&ctx->dsi->dev,"failed to add mode %ux%ux@%u\n" , feiyang_default_mode.hdisplay, feiyang_default_mode.vdisplay, - feiyang_default_mode.vrefresh); +drm_mode_vrefresh (&feiyang_default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-ilitek-ili9322.c +0 -7
@@ -549,7 +549,6 @@ static const struct drm_display_mode srgb_320x240_mode = { .vsync_start = 240 + 4, .vsync_end = 240 + 4 + 1, .vtotal = 262, - .vrefresh = 60, .flags = 0, };
@@ -563,7 +562,6 @@ static const struct drm_display_mode srgb_360x240_mode = { .vsync_start = 240 + 21, .vsync_end = 240 + 21 + 1, .vtotal = 262, - .vrefresh = 60, .flags = 0, };
@@ -578,7 +576,6 @@ static const struct drm_display_mode prgb_320x240_mode = { .vsync_start = 240 + 4, .vsync_end = 240 + 4 + 1, .vtotal = 262, - .vrefresh = 60, .flags = 0, };
@@ -593,7 +590,6 @@ static const struct drm_display_mode yuv_640x320_mode = { .vsync_start = 320 + 4, .vsync_end = 320 + 4 + 1, .vtotal = 320 + 4 + 1 + 18, - .vrefresh = 60, .flags = 0, };
@@ -607,7 +603,6 @@ static const struct drm_display_mode yuv_720x360_mode = { .vsync_start = 360 + 4, .vsync_end = 360 + 4 + 1, .vtotal = 360 + 4 + 1 + 18, - .vrefresh = 60, .flags = 0, };
@@ -622,7 +617,6 @@ static const struct drm_display_mode itu_r_bt_656_640_mode = { .vsync_start = 480 + 4, .vsync_end = 480 + 4 + 1, .vtotal = 500, - .vrefresh = 60, .flags = 0, };
@@ -637,7 +631,6 @@ static const struct drm_display_mode itu_r_bt_656_720_mode = { .vsync_start = 480 + 4, .vsync_end = 480 + 4 + 1, .vtotal = 500, - .vrefresh = 60, .flags = 0, };
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +1 -2
@@ -370,7 +370,6 @@ static int ili9881c_unprepare(struct drm_panel *panel)static const struct drm_display_mode bananapi_default_mode = { .clock =62000 , - .vrefresh =60 , .hdisplay =720 , .hsync_start =720 +10 ,
@@ -394,7 +393,7 @@ static int ili9881c_get_modes(struct drm_panel *panel,dev_err (&ctx->dsi->dev,"failed to add mode %ux%ux@%u\n" , bananapi_default_mode.hdisplay, bananapi_default_mode.vdisplay, - bananapi_default_mode.vrefresh); +drm_mode_vrefresh (&bananapi_default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-innolux-p079zca.c +1 -3
@@ -223,7 +223,6 @@ static const struct drm_display_mode innolux_p079zca_mode = { .vsync_start = 1024 + 20, .vsync_end = 1024 + 20 + 4, .vtotal = 1024 + 20 + 4 + 20, - .vrefresh = 60, };static const struct panel_desc innolux_p079zca_panel_desc = {
@@ -257,7 +256,6 @@ static const struct drm_display_mode innolux_p097pfg_mode = { .vsync_start = 2048 + 100, .vsync_end = 2048 + 100 + 2, .vtotal = 2048 + 100 + 2 + 18, - .vrefresh = 60, };/*
@@ -401,7 +399,7 @@ static int innolux_panel_get_modes(struct drm_panel *panel, mode =drm_mode_duplicate (connector->dev, m);if (!mode) {DRM_DEV_ERROR (panel->dev,"failed to add mode %ux%ux@%u\n" , - m->hdisplay, m->vdisplay, m->vrefresh); + m->hdisplay, m->vdisplay,drm_mode_vrefresh (m));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-jdi-lt070me05000.c +1 -2
@@ -296,7 +296,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 1920 + 3, .vsync_end = 1920 + 3 + 5, .vtotal = 1920 + 3 + 5 + 6, - .vrefresh = 60, .flags = 0, };
@@ -311,7 +310,7 @@ static int jdi_panel_get_modes(struct drm_panel *panel,if (!mode) {dev_err (dev,"failed to add mode %ux%ux@%u\n" , default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); +drm_mode_vrefresh (&default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c +1 -2
@@ -318,7 +318,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 2048 + 95, .vsync_end = 2048 + 95 + 2, .vtotal = 2048 + 95 + 2 + 23, - .vrefresh = 60, }; static int kingdisplay_panel_get_modes(struct drm_panel *panel,
@@ -330,7 +329,7 @@ static int kingdisplay_panel_get_modes(struct drm_panel *panel,if (!mode) {DRM_DEV_ERROR (panel->dev,"failed to add mode %ux%ux@%u\n" , default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); +drm_mode_vrefresh (&default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c +1 -2
@@ -376,7 +376,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 1280 + 30, .vsync_end = 1280 + 30 + 4, .vtotal = 1280 + 30 + 4 + 12, - .vrefresh = 60, .clock = 69217, .width_mm = 62, .height_mm = 110,
@@ -392,7 +391,7 @@ static int ltk500hd1829_get_modes(struct drm_panel *panel,if (!mode) {DRM_DEV_ERROR (ctx->dev,"failed to add mode %ux%ux@%u\n" , default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); +drm_mode_vrefresh (&default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-lg-lb035q02.c +0 -1
@@ -134,7 +134,6 @@ static const struct drm_display_mode lb035q02_mode = { .vsync_start = 240 + 4, .vsync_end = 240 + 4 + 2, .vtotal = 240 + 4 + 2 + 18, - .vrefresh = 60, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, .width_mm = 70,
drivers/gpu/drm/panel/panel-lg-lg4573.c +1 -2
@@ -206,7 +206,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 800 + 15, .vsync_end = 800 + 15 + 15, .vtotal = 800 + 15 + 15 + 15, - .vrefresh = 60, }; static int lg4573_get_modes(struct drm_panel *panel,
@@ -218,7 +217,7 @@ static int lg4573_get_modes(struct drm_panel *panel,if (!mode) {dev_err (panel->dev,"failed to add mode %ux%ux@%u\n" , default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); +drm_mode_vrefresh (&default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-nec-nl8048hl11.c +0 -1
@@ -116,7 +116,6 @@ static const struct drm_display_mode nl8048_mode = { .vsync_start = 480 + 3, .vsync_end = 480 + 3 + 1, .vtotal = 480 + 3 + 1 + 4, - .vrefresh = 60, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, .width_mm = 89,
drivers/gpu/drm/panel/panel-novatek-nt35510.c +0 -1
@@ -1028,7 +1028,6 @@ static const struct nt35510_config nt35510_hydis_hva40wv1 = { .vsync_start = 800 + 2, /* VFP = 2 */ .vsync_end = 800 + 2 + 0, /* VSync = 0 */ .vtotal = 800 + 2 + 0 + 5, /* VBP = 5 */ - .vrefresh = 60, /* Calculated */ .flags = 0, },/* 0x09: AVDD = 5.6V */
drivers/gpu/drm/panel/panel-novatek-nt39016.c +0 -2
@@ -335,7 +335,6 @@ static const struct drm_display_mode kd035g6_display_modes[] = { .vsync_start = 240 + 5, .vsync_end = 240 + 5 + 1, .vtotal = 240 + 5 + 1 + 4, - .vrefresh = 60, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, }, {/* 50 Hz */
@@ -348,7 +347,6 @@ static const struct drm_display_mode kd035g6_display_modes[] = { .vsync_start = 240 + 5, .vsync_end = 240 + 5 + 1, .vtotal = 240 + 5 + 1 + 4, - .vrefresh = 50, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, }, };
drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c +0 -1
@@ -170,7 +170,6 @@ static int lcd_olinuxino_get_modes(struct drm_panel *panel, lcd_mode->vpw; mode->vtotal = lcd_mode->vactive + lcd_mode->vfp + lcd_mode->vpw + lcd_mode->vbp; - mode->vrefresh = lcd_mode->refresh;/* Always make the first mode preferred */ if (i ==0 )
drivers/gpu/drm/panel/panel-orisetech-otm8009a.c +1 -2
@@ -81,7 +81,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 800 + 15, .vsync_end = 800 + 15 + 10, .vtotal = 800 + 15 + 10 + 14, - .vrefresh = 50, .flags = 0, .width_mm = 52, .height_mm = 86,
@@ -358,7 +357,7 @@ static int otm8009a_get_modes(struct drm_panel *panel,if (!mode) {DRM_ERROR ("failed to add mode %ux%ux@%u\n" , default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); +drm_mode_vrefresh (&default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c +1 -2
@@ -102,7 +102,6 @@ static const struct drm_display_mode default_mode_osd101t2587 = { .vsync_start = 1200 + 24, .vsync_end = 1200 + 24 + 6, .vtotal = 1200 + 24 + 6 + 48, - .vrefresh = 60, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, };
@@ -117,7 +116,7 @@ static int osd101t2587_panel_get_modes(struct drm_panel *panel,dev_err (panel->dev,"failed to add mode %ux%ux@%u\n" , osd101t2587->default_mode->hdisplay, osd101t2587->default_mode->vdisplay, - osd101t2587->default_mode->vrefresh); +drm_mode_vrefresh (osd101t2587->default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c +1 -2
@@ -149,7 +149,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 1200 + 24, .vsync_end = 1200 + 24 + 6, .vtotal = 1200 + 24 + 6 + 48, - .vrefresh = 60, }; static int wuxga_nt_panel_get_modes(struct drm_panel *panel,
@@ -161,7 +160,7 @@ static int wuxga_nt_panel_get_modes(struct drm_panel *panel,if (!mode) {dev_err (panel->dev,"failed to add mode %ux%u@%u\n" , default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); +drm_mode_vrefresh (&default_mode));return -ENOMEM ; }
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +2 -2
@@ -209,7 +209,6 @@ static const struct drm_display_mode rpi_touchscreen_modes[] = { .vsync_start = 480 + 7, .vsync_end = 480 + 7 + 2, .vtotal = 480 + 7 + 2 + 21, - .vrefresh = 60, }, };
@@ -322,7 +321,8 @@ static int rpi_touchscreen_get_modes(struct drm_panel *panel, mode = drm_mode_duplicate(connector->dev, m); if (!mode) { dev_err(panel->dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, m->vrefresh); + m->hdisplay, m->vdisplay, + drm_mode_vrefresh(m)); continue; }
drivers/gpu/drm/panel/panel-raydium-rm67191.c +1 -2
@@ -218,7 +218,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 1920 + 10, .vsync_end = 1920 + 10 + 2, .vtotal = 1920 + 10 + 2 + 4, - .vrefresh = 60, .width_mm = 68, .height_mm = 121, .flags = DRM_MODE_FLAG_NHSYNC |
@@ -445,7 +444,7 @@ static int rad_panel_get_modes(struct drm_panel *panel, if (!mode) { DRM_DEV_ERROR(panel->dev, "failed to add mode %ux%ux@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-raydium-rm68200.c +1 -2
@@ -92,7 +92,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 1280 + 12, .vsync_end = 1280 + 12 + 4, .vtotal = 1280 + 12 + 4 + 12, - .vrefresh = 50, .flags = 0, .width_mm = 68, .height_mm = 122,
@@ -339,7 +338,7 @@ static int rm68200_get_modes(struct drm_panel *panel, if (!mode) { DRM_ERROR("failed to add mode %ux%ux@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c +2 -3
@@ -223,7 +223,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 1440 + 20, .vsync_end = 1440 + 20 + 4, .vtotal = 1440 + 20 + 4 + 12, - .vrefresh = 60, .clock = 75276, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, .width_mm = 65,
@@ -240,7 +239,7 @@ static int jh057n_get_modes(struct drm_panel *panel, if (!mode) { DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
@@ -360,7 +359,7 @@ static int jh057n_probe(struct mipi_dsi_device *dsi) DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh, + drm_mode_vrefresh(&default_mode), mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); jh057n_debugfs_init(ctx);
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +0 -1
@@ -103,7 +103,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 600 + 12, .vsync_end = 600 + 12 + 10, .vtotal = 600 + 12 + 10 + 13, - .vrefresh = 60, .width_mm = 154, .height_mm = 85,
drivers/gpu/drm/panel/panel-samsung-s6d16d0.c +0 -6
@@ -37,12 +37,6 @@ static const struct drm_display_mode samsung_s6d16d0_mode = { .vsync_start = 480 + 1, .vsync_end = 480 + 1 + 1, .vtotal = 480 + 1 + 1 + 1, - /* - * This depends on the clocking HS vs LP rate, this value - * is calculated as: - * vrefresh = (clock * 1000) / (htotal*vtotal) - */ - .vrefresh = 816, .width_mm = 84, .height_mm = 48, };
drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +1 -3
@@ -617,7 +617,6 @@ static const struct drm_display_mode s6e3ha2_mode = { .vsync_start = 2560 + 1, .vsync_end = 2560 + 1 + 1, .vtotal = 2560 + 1 + 1 + 15, - .vrefresh = 60, .flags = 0, };
@@ -636,7 +635,6 @@ static const struct drm_display_mode s6e3hf2_mode = { .vsync_start = 2560 + 1, .vsync_end = 2560 + 1 + 1, .vtotal = 2560 + 1 + 1 + 15, - .vrefresh = 60, .flags = 0, };
@@ -655,7 +653,7 @@ static int s6e3ha2_get_modes(struct drm_panel *panel, if (!mode) { DRM_ERROR("failed to add mode %ux%ux@%u\n", ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay, - ctx->desc->mode->vrefresh); + drm_mode_vrefresh(ctx->desc->mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c +1 -2
@@ -52,7 +52,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 320 + 150, .vsync_end = 320 + 150 + 1, .vtotal = 320 + 150 + 1 + 2, - .vrefresh = 30, .flags = 0, };
@@ -409,7 +408,7 @@ static int s6e63j0x03_get_modes(struct drm_panel *panel, if (!mode) { DRM_ERROR("failed to add mode %ux%ux@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +1 -2
@@ -117,7 +117,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 800 + 28, .vsync_end = 800 + 28 + 2, .vtotal = 800 + 28 + 2 + 1, - .vrefresh = 60, .width_mm = 53, .height_mm = 89, .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
@@ -371,7 +370,7 @@ static int s6e63m0_get_modes(struct drm_panel *panel, if (!mode) { DRM_ERROR("failed to add mode %ux%ux@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c +0 -1
@@ -177,7 +177,6 @@ static const struct drm_display_mode s6e88a0_ams452ef01_mode = { .vsync_start = 960 + 14, .vsync_end = 960 + 14 + 2, .vtotal = 960 + 14 + 2 + 8, - .vrefresh = 60, .width_mm = 56, .height_mm = 100, };
drivers/gpu/drm/panel/panel-seiko-43wvf1g.c +2 -1
@@ -92,7 +92,8 @@ static int seiko_panel_get_fixed_modes(struct seiko_panel *panel, mode = drm_mode_duplicate(connector->dev, m); if (!mode) { dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, m->vrefresh); + m->hdisplay, m->vdisplay, + drm_mode_vrefresh(m)); continue; }
drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c +1 -2
@@ -269,7 +269,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 1600 + 4, .vsync_end = 1600 + 4 + 8, .vtotal = 1600 + 4 + 8 + 32, - .vrefresh = 60, }; static int sharp_panel_get_modes(struct drm_panel *panel,
@@ -281,7 +280,7 @@ static int sharp_panel_get_modes(struct drm_panel *panel, if (!mode) { dev_err(panel->dev, "failed to add mode %ux%ux@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-sharp-ls037v7dw01.c +0 -1
@@ -93,7 +93,6 @@ static const struct drm_display_mode ls037v7dw01_mode = { .vsync_start = 640 + 1, .vsync_end = 640 + 1 + 1, .vtotal = 640 + 1 + 1 + 1, - .vrefresh = 58, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, .width_mm = 56,
drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c +1 -2
@@ -201,7 +201,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 960 + 3, .vsync_end = 960 + 3 + 15, .vtotal = 960 + 3 + 15 + 1, - .vrefresh = 60, }; static int sharp_nt_panel_get_modes(struct drm_panel *panel,
@@ -213,7 +212,7 @@ static int sharp_nt_panel_get_modes(struct drm_panel *panel, if (!mode) { dev_err(panel->dev, "failed to add mode %ux%u@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-simple.c +2 -89
625 lines not on this page · raw message
drivers/gpu/drm/panel/panel-sitronix-st7701.c +1 -1
@@ -272,7 +272,7 @@ static int st7701_get_modes(struct drm_panel *panel, DRM_DEV_ERROR(&st7701->dsi->dev, "failed to add mode %ux%ux@%u\n", desc_mode->hdisplay, desc_mode->vdisplay, - desc_mode->vrefresh); + drm_mode_vrefresh(desc_mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-sitronix-st7789v.c +1 -2
@@ -165,7 +165,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 320 + 8, .vsync_end = 320 + 8 + 4, .vtotal = 320 + 8 + 4 + 4, - .vrefresh = 60, }; static int st7789v_get_modes(struct drm_panel *panel,
@@ -177,7 +176,7 @@ static int st7789v_get_modes(struct drm_panel *panel, if (!mode) { dev_err(panel->dev, "failed to add mode %ux%ux@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
drivers/gpu/drm/panel/panel-sony-acx424akp.c +0 -2
@@ -57,7 +57,6 @@ static const struct drm_display_mode sony_acx424akp_vid_mode = { .vsync_start = 864 + 14, .vsync_end = 864 + 14 + 1, .vtotal = 864 + 14 + 1 + 11, - .vrefresh = 60, .width_mm = 48, .height_mm = 84, .flags = DRM_MODE_FLAG_PVSYNC,
@@ -81,7 +80,6 @@ static const struct drm_display_mode sony_acx424akp_cmd_mode = { * Some desired refresh rate, experiments at the maximum "pixel" * clock speed (HS clock 420 MHz) yields around 117Hz. */ - .vrefresh = 60, .width_mm = 48, .height_mm = 84, };
drivers/gpu/drm/panel/panel-sony-acx565akm.c +0 -1
@@ -514,7 +514,6 @@ static const struct drm_display_mode acx565akm_mode = { .vsync_start = 480 + 3, .vsync_end = 480 + 3 + 3, .vtotal = 480 + 3 + 3 + 4, - .vrefresh = 57, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, .width_mm = 77,
drivers/gpu/drm/panel/panel-tpo-td028ttec1.c +0 -1
@@ -281,7 +281,6 @@ static const struct drm_display_mode td028ttec1_mode = { .vsync_start = 640 + 4, .vsync_end = 640 + 4 + 2, .vtotal = 640 + 4 + 2 + 2, - .vrefresh = 66, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, .width_mm = 43,
drivers/gpu/drm/panel/panel-tpo-td043mtea1.c +0 -1
@@ -339,7 +339,6 @@ static const struct drm_display_mode td043mtea1_mode = { .vsync_start = 480 + 39, .vsync_end = 480 + 39 + 1, .vtotal = 480 + 39 + 1 + 34, - .vrefresh = 60, .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, .width_mm = 94,
drivers/gpu/drm/panel/panel-tpo-tpg110.c +0 -5
@@ -112,7 +112,6 @@ static const struct tpg110_panel_mode tpg110_modes[] = { .vsync_start = 480 + 10, .vsync_end = 480 + 10 + 1, .vtotal = 480 + 10 + 1 + 35, - .vrefresh = 60, }, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, },
@@ -129,7 +128,6 @@ static const struct tpg110_panel_mode tpg110_modes[] = { .vsync_start = 480 + 18, .vsync_end = 480 + 18 + 1, .vtotal = 480 + 18 + 1 + 27, - .vrefresh = 60, }, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, },
@@ -146,7 +144,6 @@ static const struct tpg110_panel_mode tpg110_modes[] = { .vsync_start = 272 + 2, .vsync_end = 272 + 2 + 1, .vtotal = 272 + 2 + 1 + 12, - .vrefresh = 60, }, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, },
@@ -163,7 +160,6 @@ static const struct tpg110_panel_mode tpg110_modes[] = { .vsync_start = 640 + 4, .vsync_end = 640 + 4 + 1, .vtotal = 640 + 4 + 1 + 8, - .vrefresh = 60, }, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, },
@@ -180,7 +176,6 @@ static const struct tpg110_panel_mode tpg110_modes[] = { .vsync_start = 240 + 2, .vsync_end = 240 + 2 + 1, .vtotal = 240 + 2 + 1 + 20, - .vrefresh = 60, }, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, },
drivers/gpu/drm/panel/panel-truly-nt35597.c +0 -1
@@ -534,7 +534,6 @@ static const struct drm_display_mode qcom_sdm845_mtp_2k_mode = { .vsync_start = 2560 + 8, .vsync_end = 2560 + 8 + 1, .vtotal = 2560 + 8 + 1 + 7, - .vrefresh = 60, .flags = 0, };
drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c +1 -2
@@ -243,7 +243,6 @@ static const struct drm_display_mode default_mode = { .vsync_start = 1280 + 22, .vsync_end = 1280 + 22 + 4, .vtotal = 1280 + 22 + 4 + 11, - .vrefresh = 60, .clock = 64000, .width_mm = 68, .height_mm = 121,
@@ -259,7 +258,7 @@ static int xpp055c272_get_modes(struct drm_panel *panel, if (!mode) { DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n", default_mode.hdisplay, default_mode.vdisplay, - default_mode.vrefresh); + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
drivers/gpu/drm/sti/sti_hda.c +0 -1
@@ -586,7 +586,6 @@ static int sti_hda_connector_get_modes(struct drm_connector *connector) &hda_supported_modes[i].mode); if (!mode) continue; - mode->vrefresh = drm_mode_vrefresh(mode); /* the first mode is the preferred mode */ if (i == 0)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -2
@@ -2138,7 +2138,6 @@ void vmw_guess_mode_timing(struct drm_display_mode *mode) mode->vtotal = mode->vsync_end + 50; mode->clock = (u32)mode->htotal * (u32)mode->vtotal / 100 * 6; - mode->vrefresh = drm_mode_vrefresh(mode); }
@@ -2212,7 +2211,6 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector, mode = drm_mode_duplicate(dev, bmode); if (!mode) return 0; - mode->vrefresh = drm_mode_vrefresh(mode); drm_mode_probed_add(connector, mode); }
include/drm/drm_modes.h +1 -11
@@ -380,16 +380,6 @@ struct drm_display_mode { */ int private_flags; - /** - * @vrefresh: - * - * Vertical refresh rate, for debug output in human readable form. Not - * used in a functional way. - * - * This value is in Hz. - */ - int vrefresh; - /** * @picture_aspect_ratio: *
@@ -421,7 +411,7 @@ struct drm_display_mode { * @m: display mode */ #define DRM_MODE_ARG(m) \ - (m)->name, (m)->vrefresh, (m)->clock, \ + (m)->name, drm_mode_vrefresh(m), (m)->clock, \ (m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \ (m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \ (m)->type, (m)->flags
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 4/16 drm/msm/dpu: Stop copying around mode->private_flags
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
The driver never sets mode->private_flags so copying it back and forth is entirely pointless. Stop doing it.
Also drop private_flags from the tracepoint.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 29 +-------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 10 +++---- 2 files changed, 5 insertions(+), 34 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +1 -28
@@ -498,23 +498,6 @@ void dpu_encoder_helper_split_config( } } -static void _dpu_encoder_adjust_mode (struct drm_connector *connector, -struct drm_display_mode *adj_mode) -{ -struct drm_display_mode *cur_mode; - -if (!connector || !adj_mode) -return ; - -list_for_each_entry (cur_mode, &connector->modes, head) { -if (cur_mode->vdisplay == adj_mode->vdisplay && - cur_mode->hdisplay == adj_mode->hdisplay && -drm_mode_vrefresh (cur_mode) ==drm_mode_vrefresh (adj_mode)) { - adj_mode->private_flags |= cur_mode->private_flags; - } - } -} - static struct msm_display_topology dpu_encoder_get_topology( struct dpu_encoder_virt *dpu_enc, struct dpu_kms *dpu_kms,
@@ -580,15 +563,6 @@ static int dpu_encoder_virt_atomic_check( global_state =dpu_kms_get_existing_global_state (dpu_kms);trace_dpu_enc_atomic_check (DRMID (drm_enc)); -/* -* display drivers may populate private fields of the drm display mode -* structure while registering possible modes of a connector with DRM. -* These private fields are not populated back while DRM invokes -* the mode_set callbacks. This module retrieves and populates the -* private fields of the given mode. -*/ -_dpu_encoder_adjust_mode (conn_state->connector, adj_mode); -/* perform atomic check on the first physical encoder (master) */ for (i =0 ; i < dpu_enc->num_phys_encs; i++) {struct dpu_encoder_phys *phys = dpu_enc->phys_encs[i];
@@ -621,8 +595,7 @@ static int dpu_encoder_virt_atomic_check( } } -trace_dpu_enc_atomic_check_flags (DRMID (drm_enc), adj_mode->flags, - adj_mode->private_flags); +trace_dpu_enc_atomic_check_flags (DRMID (drm_enc), adj_mode->flags);return ret; }
drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h +4 -6
@@ -327,20 +327,18 @@ DEFINE_EVENT(dpu_enc_keyval_template, dpu_enc_trigger_start, );TRACE_EVENT (dpu_enc_atomic_check_flags, - TP_PROTO(uint32_t drm_id, unsigned int flags, int private_flags), -TP_ARGS (drm_id, flags, private_flags), + TP_PROTO(uint32_t drm_id, unsigned int flags), +TP_ARGS (drm_id, flags),TP_STRUCT__entry ( __field( uint32_t, drm_id ) __field( unsigned int, flags ) -__field ( int, private_flags ) ),TP_fast_assign ( __entry->drm_id = drm_id; __entry->flags = flags; - __entry->private_flags = private_flags; ), -TP_printk ("id=%u, flags=%u, private_flags=%d" , - __entry->drm_id, __entry->flags, __entry->private_flags) +TP_printk ("id=%u, flags=%u" , + __entry->drm_id, __entry->flags) ); DECLARE_EVENT_CLASS(dpu_enc_id_enable_template,
Signature · 1 line
2.24.1
PATCH v3 5/16 drm: Shrink {width,height}_mm to u16
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Instead of supporting ~2000km wide displayes let's limit ourselves to ~65m. That seems plenty big enough to me.
Even with EDID_QUIRK_DETAILED_IN_CM EDIDs seem to be limited to 10*0xfff which fits into the 16 bits.
--- include/drm/drm_modes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/drm/drm_modes.h +2 -2
@@ -330,7 +330,7 @@ struct drm_display_mode {* Addressable size of the output in mm, projectors should set this to * 0. */ -int width_mm; +u16 width_mm;/** * @height_mm:
@@ -338,7 +338,7 @@ struct drm_display_mode {* Addressable size of the output in mm, projectors should set this to * 0. */ -int height_mm; +u16 height_mm;/** * @crtc_clock:
Signature · 6 lines
2.24.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 6/16 drm: Shrink mode->type to u8
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
We only have 7 bits defined for mode->type. Shrink the storage to u8.
--- include/drm/drm_modes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_modes.h +1 -1
@@ -270,7 +270,7 @@ struct drm_display_mode {* which are stuck around for hysterical raisins only. No one has an * idea what they were meant for. Don't use. */ -unsigned int type; +u8 type;/** * @clock:
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 7/16 drm: Make mode->flags u32
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
The mode flags are direclty exposed in the uapi as u32. Use the same size type to store them internally.
--- include/drm/drm_modes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_modes.h +1 -1
@@ -322,7 +322,7 @@ struct drm_display_mode {* - DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF: frame split into left and * right parts. */ -unsigned int flags; +u32 flags;/** * @width_mm:
Signature · 6 lines
2.24.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 8/16 drm: Shrink drm_display_mode timings
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Store the timings (apart from the clock) as u16. The uapi mode struct already uses u16 for everything so using something bigger internally doesn't really help us.
--- drivers/gpu/drm/drm_modes.c | 7 ------ include/drm/drm_modes.h | 46 ++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 30 deletions(-)
drivers/gpu/drm/drm_modes.c +0 -7
@@ -1901,13 +1901,6 @@ EXPORT_SYMBOL(drm_mode_create_from_cmdline_mode);void drm_mode_convert_to_umode (struct drm_mode_modeinfo *out,const struct drm_display_mode *in) { -WARN (in->hdisplay >USHRT_MAX || in->hsync_start >USHRT_MAX || - in->hsync_end >USHRT_MAX || in->htotal >USHRT_MAX || - in->hskew >USHRT_MAX || in->vdisplay >USHRT_MAX || - in->vsync_start >USHRT_MAX || in->vsync_end >USHRT_MAX || - in->vtotal >USHRT_MAX || in->vscan >USHRT_MAX , -"timing values too large for mode info\n" ); - out->clock = in->clock; out->hdisplay = in->hdisplay; out->hsync_start = in->hsync_start;
include/drm/drm_modes.h +23 -23
58 lines not on this page · raw message
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 9/16 drm: Flatten drm_mode_vrefresh()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Remove the pointless whole-function indentation. Also don't need to worry about negative values anymore since we switched everything to u16.
--- drivers/gpu/drm/drm_modes.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)
drivers/gpu/drm/drm_modes.c +12 -14
@@ -757,24 +757,22 @@ EXPORT_SYMBOL(drm_mode_set_name);*/ int drm_mode_vrefresh (const struct drm_display_mode *mode) { -int refresh =0 ; +unsigned int num, den; -if (mode->htotal >0 && mode->vtotal >0 ) { -unsigned int num, den; +if (mode->htotal ==0 || mode->vtotal ==0 ) +return 0 ; - num = mode->clock *1000 ; - den = mode->htotal * mode->vtotal; + num = mode->clock *1000 ; + den = mode->htotal * mode->vtotal; -if (mode->flags &DRM_MODE_FLAG_INTERLACE ) - num *=2 ; -if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) - den *=2 ; -if (mode->vscan >1 ) - den *= mode->vscan; +if (mode->flags &DRM_MODE_FLAG_INTERLACE ) + num *=2 ; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) + den *=2 ; +if (mode->vscan >1 ) + den *= mode->vscan; - refresh =DIV_ROUND_CLOSEST (num, den); - } -return refresh; +return DIV_ROUND_CLOSEST (num, den); }EXPORT_SYMBOL (drm_mode_vrefresh);
Signature · 6 lines
2.24.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 10/16 drm: pahole struct drm_display_mode
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Reorganize drm_display_mode to eliminate all the holes. We'll put all the actual timings to the start of the struct and all the extra junk to the end.
Gets the size down to 136 bytes on 64bit and 120 bytes on 32bit. With a bit more work we should be able to get this below the two cacheline mark even on 64bit.
--- include/drm/drm_modes.h | 139 ++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 69 deletions(-)
include/drm/drm_modes.h +70 -69
@@ -222,56 +222,6 @@ enum drm_mode_status {* For printing you can use %DRM_MODE_FMT and DRM_MODE_ARG(). */ struct drm_display_mode { -/** -* @head: -* -* struct list_head for mode lists. -*/ -struct list_head head; - -/** -* @name: -* -* Human-readable name of the mode, filled out with drm_mode_set_name(). -*/ -char name[DRM_DISPLAY_MODE_LEN ]; - -/** -* @status: -* -* Status of the mode, used to filter out modes not supported by the -* hardware. See enum &drm_mode_status. -*/ -enum drm_mode_status status; - -/** -* @type: -* -* A bitmask of flags, mostly about the source of a mode. Possible flags -* are: -* -* - DRM_MODE_TYPE_PREFERRED: Preferred mode, usually the native -* resolution of an LCD panel. There should only be one preferred -* mode per connector at any given time. -* - DRM_MODE_TYPE_DRIVER: Mode created by the driver, which is all of -* them really. Drivers must set this bit for all modes they create -* and expose to userspace. -* - DRM_MODE_TYPE_USERDEF: Mode defined via kernel command line -* -* Plus a big list of flags which shouldn't be used at all, but are -* still around since these flags are also used in the userspace ABI. -* We no longer accept modes with these types though: -* -* - DRM_MODE_TYPE_BUILTIN: Meant for hard-coded modes, unused. -* Use DRM_MODE_TYPE_DRIVER instead. -* - DRM_MODE_TYPE_DEFAULT: Again a leftover, use -* DRM_MODE_TYPE_PREFERRED instead. -* - DRM_MODE_TYPE_CLOCK_C and DRM_MODE_TYPE_CRTC_C: Define leftovers -* which are stuck around for hysterical raisins only. No one has an -* idea what they were meant for. Don't use. -*/ -u8 type; -/** * @clock: *
@@ -324,22 +274,6 @@ struct drm_display_mode {*/ u32 flags; -/** -* @width_mm: -* -* Addressable size of the output in mm, projectors should set this to -* 0. -*/ -u16 width_mm; - -/** -* @height_mm: -* -* Addressable size of the output in mm, projectors should set this to -* 0. -*/ -u16 height_mm; -/** * @crtc_clock: *
@@ -370,6 +304,50 @@ struct drm_display_mode {u16 crtc_vsync_end;u16 crtc_vtotal; +/** +* @width_mm: +* +* Addressable size of the output in mm, projectors should set this to +* 0. +*/ +u16 width_mm; + +/** +* @height_mm: +* +* Addressable size of the output in mm, projectors should set this to +* 0. +*/ +u16 height_mm; + +/** +* @type: +* +* A bitmask of flags, mostly about the source of a mode. Possible flags +* are: +* +* - DRM_MODE_TYPE_PREFERRED: Preferred mode, usually the native +* resolution of an LCD panel. There should only be one preferred +* mode per connector at any given time. +* - DRM_MODE_TYPE_DRIVER: Mode created by the driver, which is all of +* them really. Drivers must set this bit for all modes they create +* and expose to userspace. +* - DRM_MODE_TYPE_USERDEF: Mode defined via kernel command line +* +* Plus a big list of flags which shouldn't be used at all, but are +* still around since these flags are also used in the userspace ABI. +* We no longer accept modes with these types though: +* +* - DRM_MODE_TYPE_BUILTIN: Meant for hard-coded modes, unused. +* Use DRM_MODE_TYPE_DRIVER instead. +* - DRM_MODE_TYPE_DEFAULT: Again a leftover, use +* DRM_MODE_TYPE_PREFERRED instead. +* - DRM_MODE_TYPE_CLOCK_C and DRM_MODE_TYPE_CRTC_C: Define leftovers +* which are stuck around for hysterical raisins only. No one has an +* idea what they were meant for. Don't use. +*/ +u8 type; +/** * @private_flags: *
@@ -381,11 +359,11 @@ struct drm_display_mode {int private_flags;/** -* @picture_aspect_ratio: +* @head: * -* Field for setting the HDMI picture aspect ratio of a mode. +* struct list_head for mode lists. */ -enum hdmi_picture_aspect picture_aspect_ratio; +struct list_head head;/** * @export_head:
@@ -399,6 +377,29 @@ struct drm_display_mode {* avoid overhead of protecting it by mode_config.mutex. */ struct list_head export_head; + +/** +* @name: +* +* Human-readable name of the mode, filled out with drm_mode_set_name(). +*/ +char name[DRM_DISPLAY_MODE_LEN ]; + +/** +* @status: +* +* Status of the mode, used to filter out modes not supported by the +* hardware. See enum &drm_mode_status. +*/ +enum drm_mode_status status; + +/** +* @picture_aspect_ratio: +* +* Field for setting the HDMI picture aspect ratio of a mode. +*/ +enum hdmi_picture_aspect picture_aspect_ratio; + };/**
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 11/16 drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
htotal*vtotal*vrefresh ~= clock. So just say "clock" when we mean it.
--- drivers/gpu/drm/mcde/mcde_dsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/mcde/mcde_dsi.c +1 -2
@@ -537,8 +537,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,* porches and sync. */ /* (ps/s) / (pixels/s) = ps/pixels */ - pclk =DIV_ROUND_UP_ULL (1000000000000 , - (drm_mode_vrefresh (mode) * mode->htotal * mode->vtotal)); + pclk =DIV_ROUND_UP_ULL (1000000000000 , mode->clock);dev_dbg (d->dev,"picoseconds between two pixels: %llu\n" , pclk);
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 12/16 drm/i915: Stop using mode->private_flags
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Replace the use of mode->private_flags with a truly private bitmaks in our own crtc state. We also need a copy in the crtc itself so the vblank code can get at it. We already have scanline_offset in there for a similar reason, as well as the vblank->hwmode which is assigned via drm_calc_timestamping_constants(). Fortunately we now have a nice place for doing the crtc_state->crtc copy in intel_crtc_update_active_timings() which gets called both for modesets and init/resume readout.
The one slightly iffy spot is the INHERITED flag which we want to preserve until userspace/fb_helper does the first proper commit after actually calling .detecti() on the connectors. Otherwise we don't have the full sink capabilities (audio,infoframes,etc.) when .compute_config() gets called and thus we will fail to enable those features when the first userspace commit happens. The only internal commit we do prior to that should be from intel_initial_commit() and there we can simply preserve the INHERITED flag from the readout.
--- drivers/gpu/drm/i915/display/icl_dsi.c | 13 ++++------ drivers/gpu/drm/i915/display/intel_atomic.c | 1 + drivers/gpu/drm/i915/display/intel_display.c | 24 +++++++++++++------ .../drm/i915/display/intel_display_types.h | 9 ++++++- drivers/gpu/drm/i915/display/intel_tv.c | 4 ++-- drivers/gpu/drm/i915/display/vlv_dsi.c | 6 ++--- drivers/gpu/drm/i915/i915_irq.c | 4 ++-- 7 files changed, 37 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +4 -9
@@ -1469,8 +1469,7 @@ static void gen11_dsi_get_config(struct intel_encoder *encoder, pipe_config->pipe_bpp =bdw_get_pipemisc_bpp (crtc);if (gen11_dsi_is_periodic_cmd_mode (intel_dsi)) - pipe_config->hw.adjusted_mode.private_flags |= -I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE ; + pipe_config->mode_flags |=I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE ; } static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
@@ -1558,10 +1557,6 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder, pipe_config->port_clock =afe_clk (encoder, pipe_config) /5 ; -/* We would not operate in periodic command mode */ - pipe_config->hw.adjusted_mode.private_flags &= - ~I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE ; -/* * In case of TE GATE cmd mode, we * receive TE from the slave if
@@ -1569,14 +1564,14 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,*/ if (is_cmd_mode (intel_dsi)) {if (intel_dsi->ports == (BIT (PORT_B ) |BIT (PORT_A ))) - pipe_config->hw.adjusted_mode.private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_DSI_USE_TE1 |I915_MODE_FLAG_DSI_USE_TE0 ;else if (intel_dsi->ports ==BIT (PORT_B )) - pipe_config->hw.adjusted_mode.private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_DSI_USE_TE1 ;else - pipe_config->hw.adjusted_mode.private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_DSI_USE_TE0 ; }
drivers/gpu/drm/i915/display/intel_atomic.c +1 -0
@@ -252,6 +252,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->wm.need_postvbl_update = false; crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; + crtc_state->mode_flags &= ~I915_MODE_FLAG_INHERITED ;return &crtc_state->uapi; }
drivers/gpu/drm/i915/display/intel_display.c +17 -7
@@ -6425,7 +6425,7 @@ static bool hsw_post_update_enable_ips(const struct intel_crtc_state *old_crtc_s* forcibly enable IPS on the first fastset. */ if (new_crtc_state->update_pipe && - old_crtc_state->hw.adjusted_mode.private_flags &I915_MODE_FLAG_INHERITED ) + old_crtc_state->mode_flags &I915_MODE_FLAG_INHERITED )return true;return !old_crtc_state->ips_enabled;
@@ -13544,8 +13544,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,bool ret = true;u32 bp_gamma =0 ;bool fixup_inherited = fastset && - (current_config->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) && - !(pipe_config->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ); + (current_config->mode_flags &I915_MODE_FLAG_INHERITED ) && + !(pipe_config->mode_flags &I915_MODE_FLAG_INHERITED );if (fixup_inherited && !fastboot_enabled (dev_priv)) { drm_dbg_kms(&dev_priv->drm,
@@ -14337,6 +14337,8 @@ intel_crtc_update_active_timings(const struct intel_crtc_state *crtc_state)drm_calc_timestamping_constants (&crtc->base, adjusted_mode); + crtc->mode_flags = crtc_state->mode_flags; +/* * The scanline counter increments at the leading edge of hsync. *
@@ -14698,8 +14700,7 @@ static int intel_atomic_check(struct drm_device *dev,/* Catch I915_MODE_FLAG_INHERITED */ for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { -if (new_crtc_state->uapi.mode.private_flags != - old_crtc_state->uapi.mode.private_flags) +if (new_crtc_state->mode_flags != old_crtc_state->mode_flags) new_crtc_state->uapi.mode_changed = true; }
@@ -15045,7 +15046,7 @@ static void intel_update_crtc(struct intel_atomic_state *state,* of enabling them on the CRTC's first fastset. */ if (new_crtc_state->update_pipe && !modeset && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) + old_crtc_state->mode_flags &I915_MODE_FLAG_INHERITED )intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); }
@@ -17511,6 +17512,15 @@ static int intel_initial_commit(struct drm_device *dev) }if (crtc_state->hw.active) { +/* +* We've not yet detected sink capabilities +* (audio,infoframes,etc.) and thus we don't want to +* force a full state recomputation yet. We want that to +* happen only for the first real commit from userspace. +* So preserve the inherited flag for the time being. +*/ + crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ; + ret =drm_atomic_add_affected_planes (state, &crtc->base);if (ret) goto out;
@@ -18281,7 +18291,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)* set a flag to indicate that a full recalculation is * needed on the next commit. */ - mode->private_flags =I915_MODE_FLAG_INHERITED ; + crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ;intel_crtc_compute_pixel_rate (crtc_state);
drivers/gpu/drm/i915/display/intel_display_types.h +8 -1
@@ -643,7 +643,7 @@ struct intel_crtc_scaler_state {int scaler_id; }; -/* drm_mode->private_flags */ +/* {crtc,crtc_state}->mode_flags */ #define I915_MODE_FLAG_INHERITED (1<<0)/* Flag to get scanline using frame time stamps */ #define I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP (1<<1)
@@ -954,6 +954,9 @@ struct intel_crtc_state {/* Used by SDVO (and if we ever fix it, HDMI). */ unsigned pixel_multiplier; +/* I915_MODE_FLAG_* */ +u8 mode_flags; +u8 lane_count;/*
@@ -1116,6 +1119,10 @@ struct intel_crtc {*/ bool active;u8 plane_ids_mask; + +/* I915_MODE_FLAG_* */ +u8 mode_flags; +unsigned long long enabled_power_domains;struct intel_overlay *overlay;
drivers/gpu/drm/i915/display/intel_tv.c +2 -2
@@ -1158,7 +1158,7 @@ intel_tv_get_config(struct intel_encoder *encoder,/* pixel counter doesn't work on i965gm TV output */ if (IS_I965GM (dev_priv)) - adjusted_mode->private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_USE_SCANLINE_COUNTER ; }
@@ -1328,7 +1328,7 @@ intel_tv_compute_config(struct intel_encoder *encoder,/* pixel counter doesn't work on i965gm TV output */ if (IS_I965GM (dev_priv)) - adjusted_mode->private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_USE_SCANLINE_COUNTER ;return 0 ;
drivers/gpu/drm/i915/display/vlv_dsi.c +3 -3
@@ -298,7 +298,7 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,if (IS_GEN9_LP (dev_priv)) {/* Enable Frame time stamp based scanline reporting */ - adjusted_mode->private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP ;/* Dual link goes to DSI transcoder A. */
@@ -1097,8 +1097,8 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder, pipe_config->pipe_bpp =bdw_get_pipemisc_bpp (crtc);/* Enable Frame time stamo based scanline reporting */ - adjusted_mode->private_flags |= -I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP ; + pipe_config->mode_flags |= +I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP ;/* In terms of pixels */ adjusted_mode->crtc_hdisplay =
drivers/gpu/drm/i915/i915_irq.c +2 -2
@@ -735,7 +735,7 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc) vblank = &crtc->base.dev->vblank[drm_crtc_index (&crtc->base)]; mode = &vblank->hwmode; -if (mode->private_flags &I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP ) +if (crtc->mode_flags &I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP )return __intel_get_crtc_scanline_from_timestamp (crtc); vtotal = mode->crtc_vtotal;
@@ -794,7 +794,7 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,unsigned long irqflags;bool use_scanline_counter =INTEL_GEN (dev_priv) >=5 ||IS_G4X (dev_priv) ||IS_GEN (dev_priv,2 ) || - mode->private_flags &I915_MODE_FLAG_USE_SCANLINE_COUNTER ; + crtc->mode_flags &I915_MODE_FLAG_USE_SCANLINE_COUNTER ;if (drm_WARN_ON (&dev_priv->drm, !mode->crtc_clock)) { drm_dbg(&dev_priv->drm,
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 12/16 drm/i915: Stop using mode->private_flags
From: Ville Syrjälä <[email protected]>
Replace the use of mode->private_flags with a truly private bitmaks in our own crtc state. We also need a copy in the crtc itself so the vblank code can get at it. We already have scanline_offset in there for a similar reason, as well as the vblank->hwmode which is assigned via drm_calc_timestamping_constants(). Fortunately we now have a nice place for doing the crtc_state->crtc copy in intel_crtc_update_active_timings() which gets called both for modesets and init/resume readout.
The one slightly iffy spot is the INHERITED flag which we want to preserve until userspace/fb_helper does the first proper commit after actually calling .detecti() on the connectors. Otherwise we don't have the full sink capabilities (audio,infoframes,etc.) when .compute_config() gets called and thus we will fail to enable those features when the first userspace commit happens. The only internal commit we do prior to that should be from intel_initial_commit() and there we can simply preserve the INHERITED flag from the readout.
v2: Deal with INHERITED in sanitize_watermarks() as well
--- drivers/gpu/drm/i915/display/icl_dsi.c | 13 ++---- drivers/gpu/drm/i915/display/intel_atomic.c | 1 + drivers/gpu/drm/i915/display/intel_display.c | 40 ++++++++++++++----- .../drm/i915/display/intel_display_types.h | 9 ++++- drivers/gpu/drm/i915/display/intel_tv.c | 4 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 6 +-- drivers/gpu/drm/i915/i915_irq.c | 4 +- 7 files changed, 49 insertions(+), 28 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +4 -9
@@ -1469,8 +1469,7 @@ static void gen11_dsi_get_config(struct intel_encoder *encoder, pipe_config->pipe_bpp =bdw_get_pipemisc_bpp (crtc);if (gen11_dsi_is_periodic_cmd_mode (intel_dsi)) - pipe_config->hw.adjusted_mode.private_flags |= -I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE ; + pipe_config->mode_flags |=I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE ; } static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
@@ -1558,10 +1557,6 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder, pipe_config->port_clock =afe_clk (encoder, pipe_config) /5 ; -/* We would not operate in periodic command mode */ - pipe_config->hw.adjusted_mode.private_flags &= - ~I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE ; -/* * In case of TE GATE cmd mode, we * receive TE from the slave if
@@ -1569,14 +1564,14 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,*/ if (is_cmd_mode (intel_dsi)) {if (intel_dsi->ports == (BIT (PORT_B ) |BIT (PORT_A ))) - pipe_config->hw.adjusted_mode.private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_DSI_USE_TE1 |I915_MODE_FLAG_DSI_USE_TE0 ;else if (intel_dsi->ports ==BIT (PORT_B )) - pipe_config->hw.adjusted_mode.private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_DSI_USE_TE1 ;else - pipe_config->hw.adjusted_mode.private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_DSI_USE_TE0 ; }
drivers/gpu/drm/i915/display/intel_atomic.c +1 -0
@@ -252,6 +252,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->wm.need_postvbl_update = false; crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; + crtc_state->mode_flags &= ~I915_MODE_FLAG_INHERITED ;return &crtc_state->uapi; }
drivers/gpu/drm/i915/display/intel_display.c +29 -11
@@ -6425,7 +6425,7 @@ static bool hsw_post_update_enable_ips(const struct intel_crtc_state *old_crtc_s* forcibly enable IPS on the first fastset. */ if (new_crtc_state->update_pipe && - old_crtc_state->hw.adjusted_mode.private_flags &I915_MODE_FLAG_INHERITED ) + old_crtc_state->mode_flags &I915_MODE_FLAG_INHERITED )return true;return !old_crtc_state->ips_enabled;
@@ -13544,8 +13544,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,bool ret = true;u32 bp_gamma =0 ;bool fixup_inherited = fastset && - (current_config->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) && - !(pipe_config->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ); + (current_config->mode_flags &I915_MODE_FLAG_INHERITED ) && + !(pipe_config->mode_flags &I915_MODE_FLAG_INHERITED );if (fixup_inherited && !fastboot_enabled (dev_priv)) { drm_dbg_kms(&dev_priv->drm,
@@ -14337,6 +14337,8 @@ intel_crtc_update_active_timings(const struct intel_crtc_state *crtc_state)drm_calc_timestamping_constants (&crtc->base, adjusted_mode); + crtc->mode_flags = crtc_state->mode_flags; +/* * The scanline counter increments at the leading edge of hsync. *
@@ -14698,8 +14700,7 @@ static int intel_atomic_check(struct drm_device *dev,/* Catch I915_MODE_FLAG_INHERITED */ for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { -if (new_crtc_state->uapi.mode.private_flags != - old_crtc_state->uapi.mode.private_flags) +if (new_crtc_state->mode_flags != old_crtc_state->mode_flags) new_crtc_state->uapi.mode_changed = true; }
@@ -15045,7 +15046,7 @@ static void intel_update_crtc(struct intel_atomic_state *state,* of enabling them on the CRTC's first fastset. */ if (new_crtc_state->update_pipe && !modeset && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) + old_crtc_state->mode_flags &I915_MODE_FLAG_INHERITED )intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); }
@@ -17362,14 +17363,22 @@ void intel_modeset_init_hw(struct drm_i915_private *i915)static int sanitize_watermarks_add_affected (struct drm_atomic_state *state) {struct drm_plane *plane; -struct drm_crtc *crtc; +struct intel_crtc *crtc; -drm_for_each_crtc (crtc, state->dev) { -struct drm_crtc_state *crtc_state; +for_each_intel_crtc (state->dev, crtc) { +struct intel_crtc_state *crtc_state; - crtc_state =drm_atomic_get_crtc_state (state, crtc); + crtc_state =intel_atomic_get_crtc_state (state, crtc);if (IS_ERR (crtc_state))return PTR_ERR (crtc_state); + +if (crtc_state->hw.active) { +/* +* Preserve the inherited flag to avoid +* taking the full modeset path. +*/ + crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ; + } }drm_for_each_plane (plane, state->dev) {
@@ -17511,6 +17520,15 @@ static int intel_initial_commit(struct drm_device *dev) }if (crtc_state->hw.active) { +/* +* We've not yet detected sink capabilities +* (audio,infoframes,etc.) and thus we don't want to +* force a full state recomputation yet. We want that to +* happen only for the first real commit from userspace. +* So preserve the inherited flag for the time being. +*/ + crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ; + ret =drm_atomic_add_affected_planes (state, &crtc->base);if (ret) goto out;
@@ -18281,7 +18299,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)* set a flag to indicate that a full recalculation is * needed on the next commit. */ - mode->private_flags =I915_MODE_FLAG_INHERITED ; + crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ;intel_crtc_compute_pixel_rate (crtc_state);
drivers/gpu/drm/i915/display/intel_display_types.h +8 -1
@@ -643,7 +643,7 @@ struct intel_crtc_scaler_state {int scaler_id; }; -/* drm_mode->private_flags */ +/* {crtc,crtc_state}->mode_flags */ #define I915_MODE_FLAG_INHERITED (1<<0)/* Flag to get scanline using frame time stamps */ #define I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP (1<<1)
@@ -954,6 +954,9 @@ struct intel_crtc_state {/* Used by SDVO (and if we ever fix it, HDMI). */ unsigned pixel_multiplier; +/* I915_MODE_FLAG_* */ +u8 mode_flags; +u8 lane_count;/*
@@ -1116,6 +1119,10 @@ struct intel_crtc {*/ bool active;u8 plane_ids_mask; + +/* I915_MODE_FLAG_* */ +u8 mode_flags; +unsigned long long enabled_power_domains;struct intel_overlay *overlay;
drivers/gpu/drm/i915/display/intel_tv.c +2 -2
@@ -1158,7 +1158,7 @@ intel_tv_get_config(struct intel_encoder *encoder,/* pixel counter doesn't work on i965gm TV output */ if (IS_I965GM (dev_priv)) - adjusted_mode->private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_USE_SCANLINE_COUNTER ; }
@@ -1328,7 +1328,7 @@ intel_tv_compute_config(struct intel_encoder *encoder,/* pixel counter doesn't work on i965gm TV output */ if (IS_I965GM (dev_priv)) - adjusted_mode->private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_USE_SCANLINE_COUNTER ;return 0 ;
drivers/gpu/drm/i915/display/vlv_dsi.c +3 -3
@@ -298,7 +298,7 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,if (IS_GEN9_LP (dev_priv)) {/* Enable Frame time stamp based scanline reporting */ - adjusted_mode->private_flags |= + pipe_config->mode_flags |=I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP ;/* Dual link goes to DSI transcoder A. */
@@ -1097,8 +1097,8 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder, pipe_config->pipe_bpp =bdw_get_pipemisc_bpp (crtc);/* Enable Frame time stamo based scanline reporting */ - adjusted_mode->private_flags |= -I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP ; + pipe_config->mode_flags |= +I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP ;/* In terms of pixels */ adjusted_mode->crtc_hdisplay =
drivers/gpu/drm/i915/i915_irq.c +2 -2
@@ -735,7 +735,7 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc) vblank = &crtc->base.dev->vblank[drm_crtc_index (&crtc->base)]; mode = &vblank->hwmode; -if (mode->private_flags &I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP ) +if (crtc->mode_flags &I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP )return __intel_get_crtc_scanline_from_timestamp (crtc); vtotal = mode->crtc_vtotal;
@@ -794,7 +794,7 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,unsigned long irqflags;bool use_scanline_counter =INTEL_GEN (dev_priv) >=5 ||IS_G4X (dev_priv) ||IS_GEN (dev_priv,2 ) || - mode->private_flags &I915_MODE_FLAG_USE_SCANLINE_COUNTER ; + crtc->mode_flags &I915_MODE_FLAG_USE_SCANLINE_COUNTER ;if (drm_WARN_ON (&dev_priv->drm, !mode->crtc_clock)) { drm_dbg(&dev_priv->drm,
Signature · 6 lines
2.24.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 13/16 drm/i915: Replace I915_MODE_FLAG_INHERITED with a boolean
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
There's no reason for I915_MODE_FLAG_INHERITED to exist as a flag anymore. Just make it a boolean.
--- drivers/gpu/drm/i915/display/intel_atomic.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++--------- .../gpu/drm/i915/display/intel_display_types.h | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_atomic.c +1 -1
@@ -249,10 +249,10 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->update_wm_post = false; crtc_state->fifo_changed = false; crtc_state->preload_luts = false; + crtc_state->inherited = false; crtc_state->wm.need_postvbl_update = false; crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; - crtc_state->mode_flags &= ~I915_MODE_FLAG_INHERITED ;return &crtc_state->uapi; }
drivers/gpu/drm/i915/display/intel_display.c +6 -9
@@ -6424,8 +6424,7 @@ static bool hsw_post_update_enable_ips(const struct intel_crtc_state *old_crtc_s* We can't read out IPS on broadwell, assume the worst and * forcibly enable IPS on the first fastset. */ -if (new_crtc_state->update_pipe && - old_crtc_state->mode_flags &I915_MODE_FLAG_INHERITED ) +if (new_crtc_state->update_pipe && old_crtc_state->inherited)return true;return !old_crtc_state->ips_enabled;
@@ -13544,8 +13543,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,bool ret = true;u32 bp_gamma =0 ;bool fixup_inherited = fastset && - (current_config->mode_flags &I915_MODE_FLAG_INHERITED ) && - !(pipe_config->mode_flags &I915_MODE_FLAG_INHERITED ); + current_config->inherited && !pipe_config->inherited;if (fixup_inherited && !fastboot_enabled (dev_priv)) { drm_dbg_kms(&dev_priv->drm,
@@ -14697,10 +14695,9 @@ static int intel_atomic_check(struct drm_device *dev,int ret, i;bool any_ms = false; -/* Catch I915_MODE_FLAG_INHERITED */ for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { -if (new_crtc_state->mode_flags != old_crtc_state->mode_flags) +if (new_crtc_state->inherited != old_crtc_state->inherited) new_crtc_state->uapi.mode_changed = true; }
@@ -15046,7 +15043,7 @@ static void intel_update_crtc(struct intel_atomic_state *state,* of enabling them on the CRTC's first fastset. */ if (new_crtc_state->update_pipe && !modeset && - old_crtc_state->mode_flags &I915_MODE_FLAG_INHERITED ) + old_crtc_state->inherited)intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); }
@@ -17519,7 +17516,7 @@ static int intel_initial_commit(struct drm_device *dev)* happen only for the first real commit from userspace. * So preserve the inherited flag for the time being. */ - crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ; + crtc_state->inherited = true; ret =drm_atomic_add_affected_planes (state, &crtc->base);if (ret)
@@ -18291,7 +18288,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)* set a flag to indicate that a full recalculation is * needed on the next commit. */ - crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ; + crtc_state->inherited = true;intel_crtc_compute_pixel_rate (crtc_state);
drivers/gpu/drm/i915/display/intel_display_types.h +1 -1
@@ -644,7 +644,6 @@ struct intel_crtc_scaler_state { };/* {crtc,crtc_state}->mode_flags */ -#define I915_MODE_FLAG_INHERITED (1<<0)/* Flag to get scanline using frame time stamps */ #define I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP (1<<1)/* Flag to use the scanline counter instead of the pixel counter */
@@ -839,6 +838,7 @@ struct intel_crtc_state {bool update_wm_pre, update_wm_post;/* watermarks are updated */ bool fifo_changed;/* FIFO split is changed */ bool preload_luts; +bool inherited;/* state inherited from BIOS? */ /* Pipe source size (ie. panel fitter input size) * All planes will be positioned inside this space,
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 13/16 drm/i915: Replace I915_MODE_FLAG_INHERITED with a boolean
From: Ville Syrjälä <[email protected]>
There's no reason for I915_MODE_FLAG_INHERITED to exist as a flag anymore. Just make it a boolean.
v2: Deal with sanitize_watermarks()
--- drivers/gpu/drm/i915/display/intel_atomic.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 17 +++++++---------- .../gpu/drm/i915/display/intel_display_types.h | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/display/intel_atomic.c +1 -1
@@ -249,10 +249,10 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->update_wm_post = false; crtc_state->fifo_changed = false; crtc_state->preload_luts = false; + crtc_state->inherited = false; crtc_state->wm.need_postvbl_update = false; crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; - crtc_state->mode_flags &= ~I915_MODE_FLAG_INHERITED ;return &crtc_state->uapi; }
drivers/gpu/drm/i915/display/intel_display.c +7 -10
@@ -6424,8 +6424,7 @@ static bool hsw_post_update_enable_ips(const struct intel_crtc_state *old_crtc_s* We can't read out IPS on broadwell, assume the worst and * forcibly enable IPS on the first fastset. */ -if (new_crtc_state->update_pipe && - old_crtc_state->mode_flags &I915_MODE_FLAG_INHERITED ) +if (new_crtc_state->update_pipe && old_crtc_state->inherited)return true;return !old_crtc_state->ips_enabled;
@@ -13544,8 +13543,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,bool ret = true;u32 bp_gamma =0 ;bool fixup_inherited = fastset && - (current_config->mode_flags &I915_MODE_FLAG_INHERITED ) && - !(pipe_config->mode_flags &I915_MODE_FLAG_INHERITED ); + current_config->inherited && !pipe_config->inherited;if (fixup_inherited && !fastboot_enabled (dev_priv)) { drm_dbg_kms(&dev_priv->drm,
@@ -14697,10 +14695,9 @@ static int intel_atomic_check(struct drm_device *dev,int ret, i;bool any_ms = false; -/* Catch I915_MODE_FLAG_INHERITED */ for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { -if (new_crtc_state->mode_flags != old_crtc_state->mode_flags) +if (new_crtc_state->inherited != old_crtc_state->inherited) new_crtc_state->uapi.mode_changed = true; }
@@ -15046,7 +15043,7 @@ static void intel_update_crtc(struct intel_atomic_state *state,* of enabling them on the CRTC's first fastset. */ if (new_crtc_state->update_pipe && !modeset && - old_crtc_state->mode_flags &I915_MODE_FLAG_INHERITED ) + old_crtc_state->inherited)intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); }
@@ -17377,7 +17374,7 @@ static int sanitize_watermarks_add_affected(struct drm_atomic_state *state)* Preserve the inherited flag to avoid * taking the full modeset path. */ - crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ; + crtc_state->inherited = true; } }
@@ -17527,7 +17524,7 @@ static int intel_initial_commit(struct drm_device *dev)* happen only for the first real commit from userspace. * So preserve the inherited flag for the time being. */ - crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ; + crtc_state->inherited = true; ret =drm_atomic_add_affected_planes (state, &crtc->base);if (ret)
@@ -18299,7 +18296,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)* set a flag to indicate that a full recalculation is * needed on the next commit. */ - crtc_state->mode_flags |=I915_MODE_FLAG_INHERITED ; + crtc_state->inherited = true;intel_crtc_compute_pixel_rate (crtc_state);
drivers/gpu/drm/i915/display/intel_display_types.h +1 -1
@@ -644,7 +644,6 @@ struct intel_crtc_scaler_state { };/* {crtc,crtc_state}->mode_flags */ -#define I915_MODE_FLAG_INHERITED (1<<0)/* Flag to get scanline using frame time stamps */ #define I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP (1<<1)/* Flag to use the scanline counter instead of the pixel counter */
@@ -839,6 +838,7 @@ struct intel_crtc_state {bool update_wm_pre, update_wm_post;/* watermarks are updated */ bool fifo_changed;/* FIFO split is changed */ bool preload_luts; +bool inherited;/* state inherited from BIOS? */ /* Pipe source size (ie. panel fitter input size) * All planes will be positioned inside this space,
Signature · 6 lines
2.24.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 14/16 drm/gma500: Stop using mode->private_flags
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
gma500 only uses mode->private_flags to convey the sdvo pixel multiplier from the encoder .mode_fixup() hook to the encoder .mode_set() hook. Those always seems get called as a pair so let's just stuff the pixel multiplier into the encoder itself as there are no state objects we could use in this non-atomic driver.
Paves the way for nuking mode->private_flag.
--- drivers/gpu/drm/gma500/psb_intel_drv.h | 19 ------------------- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 11 ++++++----- 2 files changed, 6 insertions(+), 24 deletions(-)
drivers/gpu/drm/gma500/psb_intel_drv.h +0 -19
@@ -56,25 +56,6 @@#define INTEL_OUTPUT_DISPLAYPORT 9#define INTEL_OUTPUT_EDP 10 -#define INTEL_MODE_PIXEL_MULTIPLIER_SHIFT (0x0) -#define INTEL_MODE_PIXEL_MULTIPLIER_MASK (0xf << INTEL_MODE_PIXEL_MULTIPLIER_SHIFT) - -static inline void -psb_intel_mode_set_pixel_multiplier (struct drm_display_mode *mode, -int multiplier) -{ - mode->clock *= multiplier; - mode->private_flags |= multiplier; -} - -static inline int -psb_intel_mode_get_pixel_multiplier (const struct drm_display_mode *mode) -{ -return (mode->private_flags &INTEL_MODE_PIXEL_MULTIPLIER_MASK ) - >>INTEL_MODE_PIXEL_MULTIPLIER_SHIFT ; -} - -/* * Hold information useally put on the device driver privates here, * since it needs to be shared across multiple of devices drivers privates.
drivers/gpu/drm/gma500/psb_intel_sdvo.c +6 -5
@@ -132,6 +132,8 @@ struct psb_intel_sdvo {/* DDC bus used by this SDVO encoder */ uint8_t ddc_bus; +u8 pixel_multiplier; +/* Input timings for adjusted_mode */ struct psb_intel_sdvo_dtd input_dtd;
@@ -928,7 +930,6 @@ static bool psb_intel_sdvo_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *adjusted_mode) {struct psb_intel_sdvo *psb_intel_sdvo =to_psb_intel_sdvo (encoder); -int multiplier;/* We need to construct preferred input timings based on our * output timings. To do that, we have to set the output
@@ -955,8 +956,9 @@ static bool psb_intel_sdvo_mode_fixup(struct drm_encoder *encoder,/* Make the CRTC code factor in the SDVO pixel multiplier. The * SDVO device will factor out the multiplier during mode_set. */ - multiplier =psb_intel_sdvo_get_pixel_multiplier (adjusted_mode); -psb_intel_mode_set_pixel_multiplier (adjusted_mode, multiplier); + psb_intel_sdvo->pixel_multiplier = +psb_intel_sdvo_get_pixel_multiplier (adjusted_mode); + adjusted_mode->clock *= psb_intel_sdvo->pixel_multiplier;return true; }
@@ -972,7 +974,6 @@ static void psb_intel_sdvo_mode_set(struct drm_encoder *encoder,u32 sdvox;struct psb_intel_sdvo_in_out_map in_out;struct psb_intel_sdvo_dtd input_dtd; -int pixel_multiplier =psb_intel_mode_get_pixel_multiplier (adjusted_mode);int rate;int need_aux =IS_MRST (dev) ?1 :0 ;
@@ -1030,7 +1031,7 @@ static void psb_intel_sdvo_mode_set(struct drm_encoder *encoder, (void )psb_intel_sdvo_set_input_timing (psb_intel_sdvo, &input_dtd); -switch (pixel_multiplier) { +switch (psb_intel_sdvo->pixel_multiplier) {default :case 1 : rate =SDVO_CLOCK_RATE_MULT_1X ;break ;case 2 : rate =SDVO_CLOCK_RATE_MULT_2X ;break ;
Signature · 6 lines
2.24.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 15/16 drm: Nuke mode->private_flags
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
The last two uses of mode->private_flags (in i915 and gma500) are now gone. So let's remove mode->private_flags entirely.
v2: Drop the earlier int->u8 conversion
--- include/drm/drm_modes.h | 10 ---------- 1 file changed, 10 deletions(-)
include/drm/drm_modes.h +0 -10
@@ -348,16 +348,6 @@ struct drm_display_mode {*/ u8 type; -/** -* @private_flags: -* -* Driver private flags. private_flags can only be used for mode -* objects passed to drivers in modeset operations. It shouldn't be used -* by atomic drivers since they can store any additional data by -* subclassing state structures. -*/ -int private_flags; -/** * @head: *
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 16/16 drm: Replace mode->export_head with a boolean
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
In order to shrink drm_display_mode below the magic two cacheline mark in 64bit we need to shrink it by another 8 bytes. The easiest thing to eliminate is the 'export_head' list head which is only used during the getconnector ioctl to temporarly track which modes on the connector's mode list are to be exposed and which are to remain hidden.
We can simply replace the list head with a boolean which we use to tag the modes that are to be exposed. If we make sure to clear the tags after we're done with them we don't even need an extra loop over the modes to reset the tags at the start of the getconnector ioctl.
Conveniently we already have a hole for the boolean left behind by the removal of mode->private_flags. The final size of the struct is now 112 bytes on 32bit and 120 bytes on 64bit.
The downside is that drm_mode_expose_to_userspace() gets to iterate a few more modes. It already was O(n^2), now it's a slightly worse O(n^2).
Another alternative would be a temp bitmask so we wouldn't have to have anything in the mode struct itself. The main issue is how large of a bitmask do we need? I guess we could allocate it dynamically but that means an extra kcalloc() and an extra loop through the modes to count them first (or grow the bitmask with krealloc() as needed).
--- drivers/gpu/drm/drm_connector.c | 45 +++++++++++++++++++++++---------- include/drm/drm_modes.h | 24 ++++++++---------- 2 files changed, 43 insertions(+), 26 deletions(-)
drivers/gpu/drm/drm_connector.c +32 -13
@@ -2198,7 +2198,7 @@ static struct drm_encoder *drm_connector_get_encoder(struct drm_connector *connestatic bool drm_mode_expose_to_userspace (const struct drm_display_mode *mode, -const struct list_head *export_list, +const struct list_head *modes,const struct drm_file *file_priv) {/*
@@ -2214,15 +2214,17 @@ drm_mode_expose_to_userspace(const struct drm_display_mode *mode,* while preparing the list of user-modes. */ if (!file_priv->aspect_ratio_allowed) { -struct drm_display_mode *mode_itr; +const struct drm_display_mode *mode_itr; -list_for_each_entry (mode_itr, export_list, export_head) -if (drm_mode_match (mode_itr, mode, +list_for_each_entry (mode_itr, modes, head) { +if (mode_itr->expose_to_userspace && +drm_mode_match (mode_itr, mode,DRM_MODE_MATCH_TIMINGS |DRM_MODE_MATCH_CLOCK |DRM_MODE_MATCH_FLAGS |DRM_MODE_MATCH_3D_FLAGS ))return false; + } }return true;
@@ -2242,7 +2244,6 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,struct drm_mode_modeinfo u_mode;struct drm_mode_modeinfo __user *mode_ptr;uint32_t __user *encoder_ptr; -LIST_HEAD (export_list);if (!drm_core_check_feature (dev,DRIVER_MODESET ))return -EOPNOTSUPP ;
@@ -2286,25 +2287,30 @@ int drm_mode_getconnector(struct drm_device *dev, void *data, out_resp->connection = connector->status;/* delayed so we get modes regardless of pre-fill_modes state */ -list_for_each_entry (mode, &connector->modes, head) -if (drm_mode_expose_to_userspace (mode, &export_list, +list_for_each_entry (mode, &connector->modes, head) { +WARN_ON (mode->expose_to_userspace); + +if (drm_mode_expose_to_userspace (mode, &connector->modes, file_priv)) { -list_add_tail (&mode->export_head, &export_list); + mode->expose_to_userspace = true; mode_count++; } + }/* * This ioctl is called twice, once to determine how much space is * needed, and the 2nd time to fill it. -* The modes that need to be exposed to the user are maintained in the -* 'export_list'. When the ioctl is called first time to determine the, -* space, the export_list gets filled, to find the no.of modes. In the -* 2nd time, the user modes are filled, one by one from the export_list. */ if ((out_resp->count_modes >= mode_count) && mode_count) { copied =0 ; mode_ptr = (struct drm_mode_modeinfo __user *)(unsigned long )out_resp->modes_ptr; -list_for_each_entry (mode, &export_list, export_head) { +list_for_each_entry (mode, &connector->modes, head) { +if (!mode->expose_to_userspace) +continue ; + +/* Clear the tag for the next time around */ + mode->expose_to_userspace = false; +drm_mode_convert_to_umode (&u_mode, mode);/* * Reset aspect ratio flags of user-mode, if modes with
@@ -2315,13 +2321,26 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,if (copy_to_user (mode_ptr + copied, &u_mode,sizeof (u_mode))) { ret = -EFAULT ; + +/* +* Clear the tag for the rest of +* the modes for the next time around. +*/ +list_for_each_entry_continue (mode, &connector->modes, head) + mode->expose_to_userspace = false; +mutex_unlock (&dev->mode_config.mutex); goto out; } copied++; } + }else { +/* Clear the tag for the next time around */ +list_for_each_entry (mode, &connector->modes, head) + mode->expose_to_userspace = false; } + out_resp->count_modes = mode_count;mutex_unlock (&dev->mode_config.mutex);
include/drm/drm_modes.h +11 -13
@@ -348,6 +348,17 @@ struct drm_display_mode {*/ u8 type; +/** +* @expose_to_userspace: +* +* Indicates whether the mode is to be exposed to the userspace. +* This is to maintain a set of exposed modes while preparing +* user-mode's list in drm_mode_getconnector ioctl. The purpose of +* this only lies in the ioctl function, and is not to be used +* outside the function. +*/ +bool expose_to_userspace; +/** * @head: *
@@ -355,19 +366,6 @@ struct drm_display_mode {*/ struct list_head head; -/** -* @export_head: -* -* struct list_head for modes to be exposed to the userspace. -* This is to maintain a list of exposed modes while preparing -* user-mode's list in drm_mode_getconnector ioctl. The purpose of this -* list_head only lies in the ioctl function, and is not expected to be -* used outside the function. -* Once used, the stale pointers are not reset, but left as it is, to -* avoid overhead of protecting it by mode_config.mutex. -*/ -struct list_head export_head; -/** * @name: *
Signature · 6 lines
2.24.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 16/16] drm: Replace mode->export_head with a boolean
Hi Ville
I don't fully grok the i915 changes to provide meaningful review. There are couple of small comments below, but regardless of those
Patches 01-11 and 14-16 are:
Quoted 4 lines · Ville Syrjala
The downside is that
drm_mode_expose_to_userspace()gets to iterate a few more modes. It already was O(n^2), now it's a slightly worse O(n^2).
Personally I'd drop the O() sentence, or change it to It already was O(n^2), now it's slightly worse O((n+y)^2).
Quoted 7 lines
Another alternative would be a temp bitmask so we wouldn't have to have anything in the mode struct itself. The main issue is how large of a bitmask do we need? I guess we could allocate it dynamically but that means an extra
kcalloc()and an extra loop through the modes to count them first (or grow the bitmask withkrealloc()as needed).
If the walk is even remotely close to being an issue, we could consider the bitmask.
I don't think that's the case yet.
Hmm the original code never discards any entries from export_head. I wonder if there's some corner case where we could end with an "old" mode showing in the list?
For example:
- creates a user mode via drmModeCreatePropertyBlob()
- calls drmModeGetConnector() and sees their mode
- optional (?) does a modeset to and away from said mode
- removes their blob drmModeDestroyPropertyBlob()
- calls drmModeGetConnector() and still sees their removed mode.
If this is a bug (?) that we care about, we might want to add an igt test for it.
Conversely, if this is a behaviour we want to keep this patch needs some work.
HTH
Emil
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 16/16] drm: Replace mode->export_head with a boolean
Quoted 4 lines · Emil Velikov
Hi Ville
I don't fully grok the i915 changes to provide meaningful review. There are couple of small comments below, but regardless of those
Sorry, forgot to reply to this in a timely manner.
Quoted 7 lines
Patches 01-11 and 14-16 are:
Reviewed-by Emil Velikov <[email protected]>On Tue, 28 Apr 2020 at 18:20, Ville Syrjala
<[email protected]> wrote:
Quoted 6 lines
Quoted 4 lines
The downside is that
drm_mode_expose_to_userspace()gets to iterate a few more modes. It already was O(n^2), now it's a slightly worse O(n^2).Personally I'd drop the
O()sentence, or change it to It already was O(n^2), now it's slightly worse O((n+y)^2).
Dropped.
Quoted 8 lines
Quoted 8 lines
Another alternative would be a temp bitmask so we wouldn't have to have anything in the mode struct itself. The main issue is how large of a bitmask do we need? I guess we could allocate it dynamically but that means an extra
kcalloc()and an extra loop through the modes to count them first (or grow the bitmask withkrealloc()as needed).
Quoted 8 lines
If the walk is even remotely close to being an issue, we could consider the bitmask.
I don't think that's the case yet.Hmm the original code never discards any entries from
export_head. I wonder if there's some corner case where we could end with an "old" mode showing in the list?
No. export_list starts out empty so only the modes we explicitly add to the list can be reached. Thus any dangling pointers in some other mode's export_head are of no concern.
Pushed the last few patches to drm-misc-next. Thanks for the reviews everyone.
Quoted 15 lines
For example:
- creates a user mode viadrmModeCreatePropertyBlob()
- callsdrmModeGetConnector()and sees their mode
- optional (?) does a modeset to and away from said mode
- removes their blobdrmModeDestroyPropertyBlob()
- callsdrmModeGetConnector()and still sees their removed mode.If this is a bug (?) that we care about, we might want to add an igt test for it.
Conversely, if this is a behaviour we want to keep this patch needs some work.HTH
Emil
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Put drm_display_mode on diet (rev4)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm: Put drm_display_mode on diet (rev4)
URL : https://patchwork.freedesktop.org/series/73674/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 391d956587ff drm: Nuke mode->hsync eaecaca706ae drm/i915: Introduce some local intel_dp variables 88e33e5f3e3c drm: Nuke mode->vrefresh -:1445: WARNING:LONG_LINE: line over 100 characters #1445: FILE: drivers/gpu/drm/i915/display/intel_dp.c:8031: + drm_mode_vrefresh(intel_dp->attached_connector->panel.fixed_mode));
-:1454: WARNING:LONG_LINE: line over 100 characters #1454: FILE: drivers/gpu/drm/i915/display/intel_dp.c:8077:
+ drm_mode_vrefresh(intel_dp->attached_connector->panel.fixed_mode));
total: 0 errors, 2 warnings, 0 checks, 2641 lines checked 236701787646 drm/msm/dpu: Stop copying around mode->private_flags -:85: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t' #85: FILE: drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h:330:
+ TP_PROTO(uint32_t drm_id, unsigned int flags),
total: 0 errors, 0 warnings, 1 checks, 71 lines checkeddef3490cecd2 drm: Shrink {width,height}_mm to u1639beb28d7f54 drm: Shrink mode->type to u8193c14ba7aa6 drm: Make mode->flags u3280a8d788d6dd drm: Shrink drm_display_mode timingscb12bfa009ef drm: Flatten drm_mode_vrefresh()6183fd17cc04 drm: pahole struct drm_display_modec6250bb8bb4c drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh 599655854c63 drm/i915: Stop using mode->private_flagsc9d66b575ee4 drm/i915: Replace I915_MODE_FLAG_INHERITED with a boolean 4fb36e6875cf drm/gma500: Stop using mode->private_flags1899ce9671ee drm: Nuke mode->private_flagsc1a74fbc130f drm: Replace mode->export_head with a boolean
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm: Put drm_display_mode on diet (rev4)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm: Put drm_display_mode on diet (rev4)
URL : https://patchwork.freedesktop.org/series/73674/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_8387 -> Patchwork_17497
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_17497 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_17497, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17497/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_17497:
### IGT changes ###
#### Possible regressions ####
* igt@runner@aborted:
- fi-snb-2520m: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17497/fi-snb-2520m/igt@[email protected]
- fi-snb-2600: NOTRUN -> [FAIL][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17497/fi-snb-2600/igt@[email protected]
- fi-ivb-3770: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17497/fi-ivb-3770/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_17497 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@hangcheck:
- fi-icl-guc: [PASS][4] -> [INCOMPLETE][5] ([i915#1580])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8387/fi-icl-guc/igt@i915_selftest@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17497/fi-icl-guc/igt@i915_selftest@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@execlists:
- {fi-tgl-dsi}: [DMESG-FAIL][6] ([i915#656]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8387/fi-tgl-dsi/igt@i915_selftest@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17497/fi-tgl-dsi/igt@i915_selftest@[email protected]
#### Warnings ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-guc: [SKIP][8] ([fdo#109271]) -> [FAIL][9] ([i915#665] / [i915#704])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8387/fi-kbl-guc/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17497/fi-kbl-guc/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1580]: https://gitlab.freedesktop.org/drm/intel/issues/1580
[i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656
[i915#665]: https://gitlab.freedesktop.org/drm/intel/issues/665
[i915#704]: https://gitlab.freedesktop.org/drm/intel/issues/704
Participating hosts (50 -> 42)
------------------------------
Missing (8): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-ctg-p8600 fi-kbl-7560u fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8387 -> Patchwork_17497
CI-20190529: 20190529
CI_DRM_8387: 2f06b2b1d33997d1fb16564959f0ebee8a26b632 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5614: d095827add11d4e8158b87683971ee659749d9a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17497: c1a74fbc130f7246b5fb95ecf67c9edc22ca5df3 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
c1a74fbc130f drm: Replace mode->export_head with a boolean1899ce9671ee drm: Nuke mode->private_flags4fb36e6875cf drm/gma500: Stop using mode->private_flagsc9d66b575ee4 drm/i915: Replace I915_MODE_FLAG_INHERITED with a boolean 599655854c63 drm/i915: Stop using mode->private_flagsc6250bb8bb4c drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh 6183fd17cc04 drm: pahole struct drm_display_modecb12bfa009ef drm: Flatten drm_mode_vrefresh()80a8d788d6dd drm: Shrink drm_display_mode timings193c14ba7aa6 drm: Make mode->flags u3239beb28d7f54 drm: Shrink mode->type to u8def3490cecd2 drm: Shrink {width,height}_mm to u16
236701787646 drm/msm/dpu: Stop copying around mode->private_flags 88e33e5f3e3c drm: Nuke mode->vrefresheaecaca706ae drm/i915: Introduce some local intel_dp variables391d956587ff drm: Nuke mode->hsync
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17497/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Put drm_display_mode on diet (rev6)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm: Put drm_display_mode on diet (rev6)
URL : https://patchwork.freedesktop.org/series/73674/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 12add0e7c35a drm: Nuke mode->hsync be723dfd05d8 drm/i915: Introduce some local intel_dp variables fb85f7555a02 drm: Nuke mode->vrefresh -:1445: WARNING:LONG_LINE: line over 100 characters #1445: FILE: drivers/gpu/drm/i915/display/intel_dp.c:8031: + drm_mode_vrefresh(intel_dp->attached_connector->panel.fixed_mode));
-:1454: WARNING:LONG_LINE: line over 100 characters #1454: FILE: drivers/gpu/drm/i915/display/intel_dp.c:8077:
+ drm_mode_vrefresh(intel_dp->attached_connector->panel.fixed_mode));
total: 0 errors, 2 warnings, 0 checks, 2641 lines checked 37cc5204d554 drm/msm/dpu: Stop copying around mode->private_flags -:85: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t' #85: FILE: drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h:330:
+ TP_PROTO(uint32_t drm_id, unsigned int flags),
total: 0 errors, 0 warnings, 1 checks, 71 lines checked191e00221dec drm: Shrink {width,height}_mm to u1685fc97e7e8bd drm: Shrink mode->type to u89b86ee3bbf40 drm: Make mode->flags u321c06ebb25df5 drm: Shrink drm_display_mode timings1b1cbd21b272 drm: Flatten drm_mode_vrefresh()1bd439876388 drm: pahole struct drm_display_modecf2c5f9cc994 drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh d2feee34d331 drm/i915: Stop using mode->private_flags32edf0d94942 drm/i915: Replace I915_MODE_FLAG_INHERITED with a boolean 7ef686ec8216 drm/gma500: Stop using mode->private_flagsd4b55166f89f drm: Nuke mode->private_flagsdb0286c4611d drm: Replace mode->export_head with a boolean
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Put drm_display_mode on diet (rev6)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm: Put drm_display_mode on diet (rev6)
URL : https://patchwork.freedesktop.org/series/73674/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8390 -> Patchwork_17509
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/index.html
Known issues
------------
Here are the changes found in Patchwork_17509 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@hangcheck:
- fi-icl-u2: [PASS][1] -> [INCOMPLETE][2] ([i915#1580])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/fi-icl-u2/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/fi-icl-u2/igt@i915_selftest@[email protected]
[i915#1580]: https://gitlab.freedesktop.org/drm/intel/issues/1580
Participating hosts (48 -> 42)
------------------------------
Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-ctg-p8600 fi-byt-clapper
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8390 -> Patchwork_17509
CI-20190529: 20190529
CI_DRM_8390: 89473e10666c78c4df9e92c9caf03d7311c291cb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5614: d095827add11d4e8158b87683971ee659749d9a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17509: db0286c4611d0fd85cb14c8d4d8be259f1b8abb5 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
db0286c4611d drm: Replace mode->export_head with a booleand4b55166f89f drm: Nuke mode->private_flags7ef686ec8216 drm/gma500: Stop using mode->private_flags32edf0d94942 drm/i915: Replace I915_MODE_FLAG_INHERITED with a boolean d2feee34d331 drm/i915: Stop using mode->private_flagscf2c5f9cc994 drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh 1bd439876388 drm: pahole struct drm_display_mode1b1cbd21b272 drm: Flatten drm_mode_vrefresh()1c06ebb25df5 drm: Shrink drm_display_mode timings9b86ee3bbf40 drm: Make mode->flags u3285fc97e7e8bd drm: Shrink mode->type to u8191e00221dec drm: Shrink {width,height}_mm to u1637cc5204d554 drm/msm/dpu: Stop copying around mode->private_flags fb85f7555a02 drm: Nuke mode->vrefreshbe723dfd05d8 drm/i915: Introduce some local intel_dp variables12add0e7c35a drm: Nuke mode->hsync
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm: Put drm_display_mode on diet (rev6)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm: Put drm_display_mode on diet (rev6)
URL : https://patchwork.freedesktop.org/series/73674/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8390_full -> Patchwork_17509_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_17509_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [PASS][1] -> [DMESG-WARN][2] ([i915#180]) +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-kbl2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-kbl7/igt@[email protected]
* igt@kms_hdr@bpc-switch-suspend:
- shard-apl: [PASS][3] -> [DMESG-WARN][4] ([i915#180]) +4 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-apl8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-apl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [PASS][5] -> [FAIL][6] ([fdo#108145] / [i915#265])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-skl2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-skl7/igt@[email protected]
* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109441]) +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-iclb5/igt@kms_psr@psr2_cursor_blt.html
#### Possible fixes ####
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-skl: [FAIL][9] ([IGT#5] / [i915#697]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-skl9/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-skl8/igt@[email protected]
* {igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a2}:
- shard-glk: [FAIL][11] ([i915#79]) -> [PASS][12] +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-glk5/igt@kms_flip@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-glk6/igt@kms_flip@[email protected]
* {igt@kms_flip@flip-vs-suspend-interruptible@c-dp1}:
- shard-apl: [DMESG-WARN][13] ([i915#180]) -> [PASS][14] +5 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-apl8/igt@kms_flip@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-apl1/igt@kms_flip@[email protected]
* {igt@kms_flip@plain-flip-ts-check-interruptible@a-edp1}:
- shard-skl: [FAIL][15] ([i915#34]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-skl7/igt@kms_flip@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-skl4/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-wc:
- shard-skl: [FAIL][17] ([i915#49]) -> [PASS][18] +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-skl10/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-wc.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-skl3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-wc.html
* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-skl: [INCOMPLETE][19] ([i915#123] / [i915#69]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-skl8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-skl5/igt@[email protected]
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
- shard-snb: [SKIP][21] ([fdo#109271]) -> [PASS][22] +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-snb4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-snb2/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-skl: [FAIL][23] ([i915#1036]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-skl10/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-skl3/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-kbl: [DMESG-WARN][25] ([i915#180]) -> [PASS][26] +4 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-kbl4/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-kbl3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][27] ([fdo#108145] / [i915#265]) -> [PASS][28] +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-skl4/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-skl3/igt@[email protected]
* igt@kms_psr@psr2_cursor_mmap_gtt:
- shard-iclb: [SKIP][29] ([fdo#109441]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-iclb8/igt@kms_psr@psr2_cursor_mmap_gtt.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_gtt.html
#### Warnings ####
* igt@i915_pm_dc@dc6-psr:
- shard-snb: [INCOMPLETE][31] ([i915#82]) -> [SKIP][32] ([fdo#109271])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-snb6/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-snb4/igt@[email protected]
- shard-tglb: [FAIL][33] ([i915#454]) -> [SKIP][34] ([i915#468]) +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8390/shard-tglb1/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/shard-tglb2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#5]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/5
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[i915#1036]: https://gitlab.freedesktop.org/drm/intel/issues/1036
[i915#123]: https://gitlab.freedesktop.org/drm/intel/issues/123
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#46]: https://gitlab.freedesktop.org/drm/intel/issues/46
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#697]: https://gitlab.freedesktop.org/drm/intel/issues/697
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8390 -> Patchwork_17509
CI-20190529: 20190529
CI_DRM_8390: 89473e10666c78c4df9e92c9caf03d7311c291cb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5614: d095827add11d4e8158b87683971ee659749d9a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17509: db0286c4611d0fd85cb14c8d4d8be259f1b8abb5 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17509/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx