drm/i915: extract vblank/scanline code to a separate file
Subsystems (4)
cover drm/i915: extract vblank/scanline code to a separate file
Add new intel_vblank.[ch] and dump a bunch of the vblank/scanline code there.
Jani Nikula (7):
drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch] drm/i915/display: move more scanline functions to intel_vblank.[ch] drm/i915/display: use common function for checking scanline is moving drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch] drm/i915/vblank: use intel_de_read()
drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank
counter
drm/i915/reg: split out vblank/scanline regs
drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_crt.c | 1 + drivers/gpu/drm/i915/display/intel_crtc.c | 1 + drivers/gpu/drm/i915/display/intel_de.h | 7 + drivers/gpu/drm/i915/display/intel_display.c | 54 +-- .../drm/i915/display/intel_display_trace.h | 1 + drivers/gpu/drm/i915/display/intel_hdmi.c | 9 +- drivers/gpu/drm/i915/display/intel_vblank.c | 456 ++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 24 + .../gpu/drm/i915/display/intel_vblank_regs.h | 42 ++ drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/display.c | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/i915_irq.c | 408 ---------------- drivers/gpu/drm/i915/i915_irq.h | 6 - drivers/gpu/drm/i915/i915_reg.h | 35 -- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 17 files changed, 541 insertions(+), 508 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.c create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.h create mode 100644 drivers/gpu/drm/i915/display/intel_vblank_regs.h
Signature · 1 line
2.34.1
PATCH 1/7 drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]
The vblank/scanline code is fairly isolated in i915_irq.c. Split it out to new intel_vblank.[ch].
--- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_crtc.c | 1 + .../drm/i915/display/intel_display_trace.h | 1 + drivers/gpu/drm/i915/display/intel_vblank.c | 419 ++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 21 + drivers/gpu/drm/i915/i915_irq.c | 408 ----------------- drivers/gpu/drm/i915/i915_irq.h | 6 - 7 files changed, 443 insertions(+), 414 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.c create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.h
drivers/gpu/drm/i915/Makefile +1 -0
@@ -263,6 +263,7 @@ i915-y += \ display/intel_quirks.o \ display/intel_sprite.o \ display/intel_tc.o \ + display/intel_vblank.o \ display/intel_vga.o \ display/i9xx_plane.o \ display/skl_scaler.o \
drivers/gpu/drm/i915/display/intel_crtc.c +1 -0
@@ -28,6 +28,7 @@#include "intel_pipe_crc.h" #include "intel_psr.h" #include "intel_sprite.h" +#include "intel_vblank.h" #include "intel_vrr.h" #include "skl_universal_plane.h"
drivers/gpu/drm/i915/display/intel_display_trace.h +1 -0
@@ -17,6 +17,7 @@#include "i915_irq.h" #include "intel_crtc.h" #include "intel_display_types.h" +#include "intel_vblank.h" #define __dev_name_i915 (i915) dev_name((i915)->drm.dev)#define __dev_name_kms (obj) dev_name((obj)->base.dev->dev)
drivers/gpu/drm/i915/display/intel_vblank.c new file +419 -0
419 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_vblank.h new file +21 -0
@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2022 Intel Corporation +*/ + +#ifndef __INTEL_VBLANK_H__ +#define __INTEL_VBLANK_H__ + +#include <linux/ktime.h> +#include <linux/types.h> + +struct drm_crtc ; +struct intel_crtc ; + +u32 i915_get_vblank_counter (struct drm_crtc *crtc); +u32 g4x_get_vblank_counter (struct drm_crtc *crtc); +bool intel_crtc_get_vblank_timestamp (struct drm_crtc *crtc,int *max_error, +ktime_t *vblank_time,bool in_vblank_irq); +int intel_get_crtc_scanline (struct intel_crtc *crtc); + +#endif /* __INTEL_VBLANK_H__ */
drivers/gpu/drm/i915/i915_irq.c +0 -408
414 lines not on this page · raw message
drivers/gpu/drm/i915/i915_irq.h +0 -6
@@ -66,18 +66,12 @@ bool intel_irqs_enabled(struct drm_i915_private *dev_priv);void intel_synchronize_irq (struct drm_i915_private *i915);void intel_synchronize_hardirq (struct drm_i915_private *i915); -int intel_get_crtc_scanline (struct intel_crtc *crtc);void gen8_irq_power_well_post_enable (struct drm_i915_private *dev_priv,u8 pipe_mask);void gen8_irq_power_well_pre_disable (struct drm_i915_private *dev_priv,u8 pipe_mask);u32 gen8_de_pipe_underrun_mask (struct drm_i915_private *dev_priv); -bool intel_crtc_get_vblank_timestamp (struct drm_crtc *crtc,int *max_error, -ktime_t *vblank_time,bool in_vblank_irq); - -u32 i915_get_vblank_counter (struct drm_crtc *crtc); -u32 g4x_get_vblank_counter (struct drm_crtc *crtc);int i8xx_enable_vblank (struct drm_crtc *crtc);int i915gm_enable_vblank (struct drm_crtc *crtc);
Signature · 1 line
2.34.1
PATCH 2/7 drm/i915/display: move more scanline functions to intel_vblank.[ch]
In reply to Jani NikulaReduce clutter in intel_display.c by moving the scanline moving/stopped wait functions to intel_vblank.[ch].
--- drivers/gpu/drm/i915/display/intel_display.c | 36 +------------------- drivers/gpu/drm/i915/display/intel_vblank.c | 35 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 2 ++ 3 files changed, 38 insertions(+), 35 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -35
@@ -115,6 +115,7 @@#include "intel_quirks.h" #include "intel_sprite.h" #include "intel_tc.h" +#include "intel_vblank.h" #include "intel_vga.h" #include "i9xx_plane.h" #include "skl_scaler.h"
@@ -386,41 +387,6 @@ struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)return to_intel_crtc (crtc_state->uapi.crtc); } -static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, -enum pipe pipe) -{ -i915_reg_t reg =PIPEDSL (pipe); -u32 line1, line2; - - line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; -msleep (5 ); - line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; - -return line1 != line2; -} - -static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc,bool state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -enum pipe pipe = crtc->pipe; - -/* Wait for the display line to settle/start moving */ -if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) -drm_err (&dev_priv->drm, -"pipe %c scanline %s wait timed out\n" , -pipe_name (pipe),str_on_off (state)); -} - -static void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, false); -} - -static void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, true); -} -static void intel_wait_for_pipe_off (const struct intel_crtc_state *old_crtc_state) {
drivers/gpu/drm/i915/display/intel_vblank.c +35 -0
@@ -417,3 +417,38 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)return position; } + +static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, +enum pipe pipe) +{ +i915_reg_t reg =PIPEDSL (pipe); +u32 line1, line2; + + line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; +msleep (5 ); + line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; + +return line1 != line2; +} + +static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc,bool state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +enum pipe pipe = crtc->pipe; + +/* Wait for the display line to settle/start moving */ +if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) +drm_err (&dev_priv->drm, +"pipe %c scanline %s wait timed out\n" , +pipe_name (pipe),str_on_off (state)); +} + +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc) +{ +wait_for_pipe_scanline_moving (crtc, false); +} + +void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc) +{ +wait_for_pipe_scanline_moving (crtc, true); +}
drivers/gpu/drm/i915/display/intel_vblank.h +2 -0
@@ -17,5 +17,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc);bool intel_crtc_get_vblank_timestamp (struct drm_crtc *crtc,int *max_error,ktime_t *vblank_time,bool in_vblank_irq);int intel_get_crtc_scanline (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc);#endif /* __INTEL_VBLANK_H__ */
Signature · 1 line
2.34.1
PATCH 4/7 drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch]
In reply to Jani NikulaLet's not have scanline waits inline in hdmi code.
This kind of waits should really have timeouts; add a FIXME comment.
--- drivers/gpu/drm/i915/display/intel_hdmi.c | 9 ++------- drivers/gpu/drm/i915/display/intel_vblank.c | 14 ++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 1 + 3 files changed, 17 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +2 -7
@@ -56,6 +56,7 @@#include "intel_lspcon.h" #include "intel_panel.h" #include "intel_snps_phy.h" +#include "intel_vblank.h" static struct drm_i915_private *intel_hdmi_to_i915 (struct intel_hdmi *intel_hdmi) {
@@ -1476,15 +1477,9 @@ static int kbl_repositioning_enc_en_signal(struct intel_connector *connector,struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);struct intel_digital_port *dig_port =intel_attached_dig_port (connector);struct intel_crtc *crtc =to_intel_crtc (connector->base.state->crtc); -u32 scanline;int ret; -for (;;) { - scanline =intel_de_read (dev_priv,PIPEDSL (crtc->pipe)); -if (scanline >100 && scanline <200 ) -break ; -usleep_range (25 ,50 ); - } +intel_wait_for_pipe_scanline_range (crtc,100 ,200 ); ret =intel_ddi_toggle_hdcp_bits (&dig_port->base, cpu_transcoder, false,TRANS_DDI_HDCP_SIGNALLING );
drivers/gpu/drm/i915/display/intel_vblank.c +14 -0
@@ -452,3 +452,17 @@ void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) {wait_for_pipe_scanline_moving (crtc, true); } + +void intel_wait_for_pipe_scanline_range (struct intel_crtc *crtc,u32 start,u32 end) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +u32 scanline; + +/* FIXME: This needs to timeout and/or check that scanline is moving. */ +for (;;) { + scanline =intel_de_read (dev_priv,PIPEDSL (crtc->pipe)); +if (scanline > start && scanline < end) +break ; +usleep_range (25 ,50 ); + } +}
drivers/gpu/drm/i915/display/intel_vblank.h +1 -0
@@ -19,5 +19,6 @@ bool intel_crtc_get_vblank_timestamp(struct drm_crtc *crtc, int *max_error,int intel_get_crtc_scanline (struct intel_crtc *crtc);void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc);void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_range (struct intel_crtc *crtc,u32 start,u32 end);#endif /* __INTEL_VBLANK_H__ */
Signature · 1 line
2.34.1
PATCH 3/7 drm/i915/display: use common function for checking scanline is moving
In reply to Jani Nikulacpt_verify_modeset() is roughly the same as intel_wait_for_pipe_scanline_moving(). Assume it's close enough.
--- drivers/gpu/drm/i915/display/intel_display.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -17
@@ -1062,22 +1062,6 @@ intel_get_crtc_new_encoder(const struct intel_atomic_state *state,return encoder; } -static void cpt_verify_modeset (struct drm_i915_private *dev_priv, -enum pipe pipe) -{ -i915_reg_t dslreg =PIPEDSL (pipe); -u32 temp; - - temp =intel_de_read (dev_priv, dslreg); -udelay (500 ); -if (wait_for (intel_de_read (dev_priv, dslreg) != temp,5 )) { -if (wait_for (intel_de_read (dev_priv, dslreg) != temp,5 )) -drm_err (&dev_priv->drm, -"mode set failed: pipe %c stuck\n" , -pipe_name (pipe)); - } -} -static void ilk_pfit_enable (const struct intel_crtc_state *crtc_state) {struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);
@@ -1772,7 +1756,7 @@ static void ilk_crtc_enable(struct intel_atomic_state *state,intel_encoders_enable (state, crtc);if (HAS_PCH_CPT (dev_priv)) -cpt_verify_modeset (dev_priv, pipe); +intel_wait_for_pipe_scanline_moving (crtc);/* * Must wait for vblank to avoid spurious PCH FIFO underruns.
Signature · 1 line
2.34.1
PATCH 7/7 drm/i915/reg: split out vblank/scanline regs
In reply to Jani NikulaReduce clutter in i915_reg.h by splitting out the vblank/scanline registers.
--- drivers/gpu/drm/i915/display/intel_crt.c | 1 + drivers/gpu/drm/i915/display/intel_vblank.c | 1 + .../gpu/drm/i915/display/intel_vblank_regs.h | 42 +++++++++++++++++++ drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/display.c | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 35 ---------------- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 8 files changed, 48 insertions(+), 35 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_vblank_regs.h
drivers/gpu/drm/i915/display/intel_crt.c +1 -0
@@ -49,6 +49,7 @@#include "intel_hotplug.h" #include "intel_pch_display.h" #include "intel_pch_refclk.h" +#include "intel_vblank_regs.h" /* Here's the desired hotplug mode */ #define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 | \
drivers/gpu/drm/i915/display/intel_vblank.c +1 -0
@@ -8,6 +8,7 @@#include "intel_de.h" #include "intel_display_types.h" #include "intel_vblank.h" +#include "intel_vblank_regs.h" /* * This timing diagram depicts the video signal in and
drivers/gpu/drm/i915/display/intel_vblank_regs.h new file +42 -0
42 lines not on this page · raw message
drivers/gpu/drm/i915/gvt/cmd_parser.c +1 -0
@@ -38,6 +38,7 @@#include "i915_drv.h" #include "i915_reg.h" +#include "display/intel_vblank_regs.h" #include "gt/intel_engine_regs.h" #include "gt/intel_gpu_commands.h" #include "gt/intel_gt_regs.h"
drivers/gpu/drm/i915/gvt/display.c +1 -0
@@ -37,6 +37,7 @@#include "gvt.h" #include "display/intel_dpio_phy.h" +#include "display/intel_vblank_regs.h" static int get_edp_pipe (struct intel_vgpu *vgpu) {
drivers/gpu/drm/i915/gvt/handlers.c +1 -0
@@ -45,6 +45,7 @@#include "display/intel_dmc_regs.h" #include "display/intel_dpio_phy.h" #include "display/intel_fbc.h" +#include "display/intel_vblank_regs.h" #include "display/vlv_dsi_pll_regs.h" #include "gt/intel_gt_regs.h"
drivers/gpu/drm/i915/i915_reg.h +0 -35
@@ -3489,9 +3489,6 @@/* Display & cursor control */ /* Pipe A */ -#define _PIPEADSL 0x70000 -#define PIPEDSL_CURR_FIELD REG_BIT(31)/* ctg+ */ -#define PIPEDSL_LINE_MASK REG_GENMASK(19, 0)#define _PIPEACONF 0x70008#define PIPECONF_ENABLE REG_BIT(31)#define PIPECONF_DOUBLE_WIDE REG_BIT(30)/* pre-i965 */
@@ -3616,9 +3613,6 @@#define PIPE_DSI1_OFFSET 0x7b800#define PIPECONF (pipe) _MMIO_PIPE2(pipe, _PIPEACONF) -#define PIPEDSL (pipe) _MMIO_PIPE2(pipe, _PIPEADSL) -#define PIPEFRAME (pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEHIGH) -#define PIPEFRAMEPIXEL (pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEPIXEL)#define PIPESTAT (pipe) _MMIO_PIPE2(pipe, _PIPEASTAT)#define _PIPEAGCMAX 0x70010
@@ -4034,35 +4028,6 @@#define WM_LP_SPRITE_MASK REG_GENMASK(10, 0)#define WM_LP_SPRITE (x) REG_FIELD_PREP(WM_LP_SPRITE_MASK, (x)) -/* -* The two pipe frame counter registers are not synchronized, so -* reading a stable value is somewhat tricky. The following code -* should work: -* -* do { -* high1 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >> -* PIPE_FRAME_HIGH_SHIFT; -* low1 = ((INREG(PIPEAFRAMEPIXEL) & PIPE_FRAME_LOW_MASK) >> -* PIPE_FRAME_LOW_SHIFT); -* high2 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >> -* PIPE_FRAME_HIGH_SHIFT); -* } while (high1 != high2); -* frame = (high1 << 8) | low1; -*/ -#define _PIPEAFRAMEHIGH 0x70040 -#define PIPE_FRAME_HIGH_MASK 0x0000ffff -#define PIPE_FRAME_HIGH_SHIFT 0 -#define _PIPEAFRAMEPIXEL 0x70044 -#define PIPE_FRAME_LOW_MASK 0xff000000 -#define PIPE_FRAME_LOW_SHIFT 24 -#define PIPE_PIXEL_MASK 0x00ffffff -#define PIPE_PIXEL_SHIFT 0 -/* GM45+ just has to be different */ -#define _PIPEA_FRMCOUNT_G4X 0x70040 -#define _PIPEA_FLIPCOUNT_G4X 0x70044 -#define PIPE_FRMCOUNT_G4X (pipe) _MMIO_PIPE2(pipe, _PIPEA_FRMCOUNT_G4X) -#define PIPE_FLIPCOUNT_G4X (pipe) _MMIO_PIPE2(pipe, _PIPEA_FLIPCOUNT_G4X) -/* Cursor A & B regs */ #define _CURACNTR 0x70080/* Old style CUR*CNTR flags (desktop 8xx) */
drivers/gpu/drm/i915/intel_gvt_mmio_table.c +1 -0
@@ -7,6 +7,7 @@#include "display/intel_backlight_regs.h" #include "display/intel_dmc_regs.h" #include "display/intel_dpio_phy.h" +#include "display/intel_vblank_regs.h" #include "display/vlv_dsi_pll_regs.h" #include "gt/intel_gt_regs.h" #include "gvt/gvt.h"
Signature · 1 line
2.34.1
PATCH 6/7 drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank counter
In reply to Jani NikulaAdd intel_de_read64_2x32() wrapper for the uncore version of the same, and use it to read the high and low frame registers. Avoid duplicating code for existing helpers.
The slight functional difference is checking that the entire high register remains the same across two reads, instead of just the part we're interested in. This should be of no consequence. (Unless those bits function as a PRNG.)
--- drivers/gpu/drm/i915/display/intel_de.h | 7 ++++++ drivers/gpu/drm/i915/display/intel_vblank.c | 25 +++++---------------- 2 files changed, 13 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/display/intel_de.h +7 -0
@@ -22,6 +22,13 @@ intel_de_read8(struct drm_i915_private *i915, i915_reg_t reg)return intel_uncore_read8 (&i915->uncore, reg); } +static inline u64 +intel_de_read64_2x32 (struct drm_i915_private *i915, +i915_reg_t lower_reg,i915_reg_t upper_reg) +{ +return intel_uncore_read64_2x32 (&i915->uncore, lower_reg, upper_reg); +} +static inline void intel_de_posting_read (struct drm_i915_private *i915,i915_reg_t reg) {
drivers/gpu/drm/i915/display/intel_vblank.c +6 -19
@@ -68,9 +68,8 @@ u32 i915_get_vblank_counter(struct drm_crtc *crtc)struct drm_vblank_crtc *vblank = &dev_priv->drm.vblank[drm_crtc_index (crtc)];const struct drm_display_mode *mode = &vblank->hwmode;enum pipe pipe =to_intel_crtc (crtc)->pipe; -i915_reg_t high_frame, low_frame; -u32 high1, high2, low, pixel, vbl_start, hsync_start, htotal; -unsigned long irqflags; +u32 pixel, vbl_start, hsync_start, htotal; +u64 frame;/* * On i965gm TV output the frame counter only works up to
@@ -98,34 +97,22 @@ u32 i915_get_vblank_counter(struct drm_crtc *crtc)/* Start of vblank event occurs at start of hsync */ vbl_start -= htotal - hsync_start; - high_frame =PIPEFRAME (pipe); - low_frame =PIPEFRAMEPIXEL (pipe); - -spin_lock_irqsave (&dev_priv->uncore.lock, irqflags); -/* * High & low register fields aren't synchronized, so make sure * we get a low value that's stable across two reads of the high * register. */ -do { - high1 =intel_de_read_fw (dev_priv, high_frame) &PIPE_FRAME_HIGH_MASK ; - low =intel_de_read_fw (dev_priv, low_frame); - high2 =intel_de_read_fw (dev_priv, high_frame) &PIPE_FRAME_HIGH_MASK ; - }while (high1 != high2); - -spin_unlock_irqrestore (&dev_priv->uncore.lock, irqflags); + frame =intel_de_read64_2x32 (dev_priv,PIPEFRAMEPIXEL (pipe),PIPEFRAME (pipe)); - high1 >>=PIPE_FRAME_HIGH_SHIFT ; - pixel = low &PIPE_PIXEL_MASK ; - low >>=PIPE_FRAME_LOW_SHIFT ; + pixel = frame &PIPE_PIXEL_MASK ; + frame = (frame >>PIPE_FRAME_LOW_SHIFT ) &0xffffff ;/* * The frame counter increments at beginning of active. * Cook up a vblank counter by also checking the pixel * counter against vblank start. */ -return (((high1 <<8 ) | low) + (pixel >= vbl_start)) &0xffffff ; +return (frame + (pixel >= vbl_start)) &0xffffff ; }u32 g4x_get_vblank_counter (struct drm_crtc *crtc)
Signature · 1 line
2.34.1
PATCH 5/7 drm/i915/vblank: use intel_de_read()
In reply to Jani NikulaUse the intel_de_* functions for display registers.
--- drivers/gpu/drm/i915/display/intel_vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_vblank.c +1 -1
@@ -137,7 +137,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc)if (!vblank->max_vblank_count)return 0 ; -return intel_uncore_read (&dev_priv->uncore,PIPE_FRMCOUNT_G4X (pipe)); +return intel_de_read (dev_priv,PIPE_FRMCOUNT_G4X (pipe)); }static u32 intel_crtc_scanlines_since_frame_timestamp (struct intel_crtc *crtc)
Signature · 1 line
2.34.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: extract vblank/scanline code to a separate file
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915: extract vblank/scanline code to a separate file
URL : https://patchwork.freedesktop.org/series/111854/
State : warning
== Summary ==
Error: dim checkpatch failed1ab2fa26774a drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch] Traceback (most recent call last):
File "scripts/spdxcheck.py", line 11, in <module>
import git
ModuleNotFoundError: No module named 'git'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 11, in <module>
import git
ModuleNotFoundError: No module named 'git'
-:53: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #53:
new file mode 100644
-:95: WARNING:LONG_LINE_COMMENT: line length of 104 exceeds 100 columns
#95: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:38:
+ * -vbs-----> <---vbs+1---> <---vbs+2---> <-----0-----> <-----1-----> <-----2--- (scanline counter gen2)
-:96: WARNING:LONG_LINE_COMMENT: line length of 105 exceeds 100 columns
#96: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:39:
+ * -vbs-2---> <---vbs-1---> <---vbs-----> <---vbs+1---> <---vbs+2---> <-----0--- (scanline counter gen3+)
-:97: WARNING:LONG_LINE_COMMENT: line length of 109 exceeds 100 columns
#97: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:40:
+ * -vbs-2---> <---vbs-2---> <---vbs-1---> <---vbs-----> <---vbs+1---> <---vbs+2- (scanline counter hsw+ hdmi)
-:396: WARNING:LONG_LINE: line length of 116 exceeds 100 columns #396: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:339:
+ position = (intel_de_read_fw(dev_priv, PIPEFRAMEPIXEL(pipe)) & PIPE_PIXEL_MASK) >> PIPE_PIXEL_SHIFT;
-:460: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #460: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:403:
+ return drm_crtc_vblank_helper_get_vblank_timestamp_internal(
total: 0 errors, 5 warnings, 1 checks, 893 lines checkedf01494675c93 drm/i915/display: move more scanline functions to intel_vblank.[ch]
-:86: WARNING:MSLEEP: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst #86: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:428:
+ msleep(5);
total: 0 errors, 1 warnings, 0 checks, 93 lines checked95e14852bdca drm/i915/display: use common function for checking scanline is moving 52a99694085f drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch] 77b221471a62 drm/i915/vblank: use intel_de_read()861132b4e91f drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank counter ad911901f7a8 drm/i915/reg: split out vblank/scanline regs
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 11, in <module>
import git
ModuleNotFoundError: No module named 'git'
-:40: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 137 lines checked
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: extract vblank/scanline code to a separate file
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915: extract vblank/scanline code to a separate file
URL : https://patchwork.freedesktop.org/series/111854/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately. +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return'
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: extract vblank/scanline code to a separate file
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915: extract vblank/scanline code to a separate file
URL : https://patchwork.freedesktop.org/series/111854/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12493 -> Patchwork_111854v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_111854v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_111854v1, 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_111854v1/index.html
Participating hosts (40 -> 19)
------------------------------
ERROR: It appears as if the changes made in Patchwork_111854v1 prevented too many machines from booting.
Missing (21): fi-kbl-soraka bat-adls-5 bat-dg1-6 bat-dg1-5 bat-adlp-6 bat-rpls-2 fi-skl-6600u fi-bsw-n3050 bat-dg2-8 bat-adlm-1 bat-dg2-9 bat-adln-1 bat-jsl-3 bat-rplp-1 bat-dg2-11 fi-bsw-nick bat-dg1-7 bat-kbl-2 bat-adlp-9 bat-jsl-1 bat-adlp-4
Known issues
------------
Here are the changes found in Patchwork_111854v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-hsw-4770: NOTRUN -> [SKIP][1] ([fdo#109271] / [fdo#111827])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v1/fi-hsw-4770/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [FAIL][2] ([i915#7229]) -> [PASS][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12493/fi-pnv-d510/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v1/fi-pnv-d510/igt@[email protected]
* igt@gem_exec_suspend@basic-s3@smem:
- fi-rkl-11600: [FAIL][4] ([fdo#103375]) -> [PASS][5]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12493/fi-rkl-11600/igt@gem_exec_suspend@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v1/fi-rkl-11600/igt@gem_exec_suspend@[email protected]
* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [INCOMPLETE][6] ([i915#4785]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12493/fi-hsw-4770/igt@i915_selftest@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v1/fi-hsw-4770/igt@i915_selftest@[email protected]
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
Build changes
-------------
* Linux: CI_DRM_12493 -> Patchwork_111854v1
CI-20190529: 20190529
CI_DRM_12493: a6dc4d045339e2817103e99539e3efaa554c941f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7090: 5aafcf060b6dfbb2fa7aace76c8074d98ac7da8f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_111854v1: a6dc4d045339e2817103e99539e3efaa554c941f @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
85e6ae772631 drm/i915/reg: split out vblank/scanline regsf51910697280 drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank counter dc0371955fd7 drm/i915/vblank: use intel_de_read()9d717beba06e drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch] d8e0ae4dbd16 drm/i915/display: use common function for checking scanline is moving d3c5f97e4088 drm/i915/display: move more scanline functions to intel_vblank.[ch] 37bf1cfb7723 drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v1/index.html
Re: [Intel-gfx] [PATCH 3/7] drm/i915/display: use common function for checking scanline is moving
In reply to Jani NikulaQuoted 9 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 3/7] drm/i915/display: use common function for checking scanline is moving
Quoted 6 lines
cpt_verify_modeset()is roughly the same asintel_wait_for_pipe_scanline_moving(). Assume it's close enough.Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>---
Thanks and Regards,
Arun R Murthy
--------------------
Quoted 43 lines
drivers/gpu/drm/i915/display/intel_display.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-17@@ -1062,22 +1062,6 @@ intel_get_crtc_new_encoder(const structintel_atomic_state *state, return encoder; } -static void cpt_verify_modeset (struct drm_i915_private *dev_priv, -enum pipe pipe) -{ -i915_reg_t dslreg =PIPEDSL (pipe); -u32 temp; - - temp =intel_de_read (dev_priv, dslreg); -udelay (500 ); -if (wait_for (intel_de_read (dev_priv, dslreg) != temp,5 )) { -if (wait_for (intel_de_read (dev_priv, dslreg) != temp,5 )) -drm_err (&dev_priv->drm, -"mode set failed: pipe %c stuck\n" , -pipe_name (pipe)); - } -} -static void ilk_pfit_enable (const struct intel_crtc_state *crtc_state) {struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);@@ -1772,7 +1756,7 @@ static void ilk_crtc_enable(structintel_atomic_state *state,intel_encoders_enable (state ,crtc );if (HAS_PCH_CPT (dev_priv)) -cpt_verify_modeset (dev_priv, pipe); +intel_wait_for_pipe_scanline_moving (crtc);/* * Must wait for vblank to avoid spurious PCH FIFO underruns.
--
2.34.1
Re: [Intel-gfx] [PATCH 5/7] drm/i915/vblank: use intel_de_read()
In reply to Jani NikulaQuoted 8 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 5/7] drm/i915/vblank: useintel_de_read()
Quoted 5 lines
Use the intel_de_* functions for display registers.
Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>---
Thanks and Regards,
Arun R Murthy
--------------------
Quoted 21 lines
drivers/gpu/drm/i915/display/intel_vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_vblank.c +1
-1@@ -137,7 +137,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc)if (!vblank->max_vblank_count)return 0 ; -return intel_uncore_read (&dev_priv->uncore, PIPE_FRMCOUNT_G4X(pipe)); +return intel_de_read (dev_priv,PIPE_FRMCOUNT_G4X (pipe)); }static u32 intel_crtc_scanlines_since_frame_timestamp(struct
intel_crtc
*crtc)
--
2.34.1
Quoted 9 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 0/7] drm/i915: extract vblank/scanline code to a separate file
Quoted 5 lines
Add new intel_vblank.[ch] and dump a bunch of the vblank/scanline code there.
Jani Nikula (7):
drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]
Can the function naming convention such as i915_get_vblank_counter be changed to intel_get_vblank_counter in the same series?
Thanks and Regards,
Arun R Murthy
--------------------
Quoted 32 lines
drm/i915/display: move more scanline functions to intel_vblank.[ch] drm/i915/display: use common function for checking scanline is moving drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch] drm/i915/vblank: use
intel_de_read()
drm/i915/vblank: add and useintel_de_read64_2x32()to read vblank
counter
drm/i915/reg: split out vblank/scanline regsdrivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_crt.c | 1 + drivers/gpu/drm/i915/display/intel_crtc.c | 1 + drivers/gpu/drm/i915/display/intel_de.h | 7 + drivers/gpu/drm/i915/display/intel_display.c | 54 +-- .../drm/i915/display/intel_display_trace.h | 1 + drivers/gpu/drm/i915/display/intel_hdmi.c | 9 +- drivers/gpu/drm/i915/display/intel_vblank.c | 456 ++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 24 + .../gpu/drm/i915/display/intel_vblank_regs.h | 42 ++ drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/display.c | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/i915_irq.c | 408 ---------------- drivers/gpu/drm/i915/i915_irq.h | 6 - drivers/gpu/drm/i915/i915_reg.h | 35 -- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 17 files changed, 541 insertions(+), 508 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.c create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.h create mode 100644 drivers/gpu/drm/i915/display/intel_vblank_regs.h--
2.34.1
Re: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
In reply to Jani NikulaQuoted 100 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Reduce clutter in
intel_display.cby moving the scanline moving/stopped wait functions to intel_vblank.[ch].Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 36 +------------------- drivers/gpu/drm/i915/display/intel_vblank.c | 35 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 2 ++ 3 files changed, 38 insertions(+), 35 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-33@@ -115,6 +115,7 @@#include "intel_quirks.h" #include "intel_sprite.h" #include "intel_tc.h" +#include "intel_vblank.h" #include "intel_vga.h" #include "i9xx_plane.h" #include "skl_scaler.h" @@ -386,41 +387,6 @@ struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)return to_intel_crtc (crtc_state->uapi.crtc); } -static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, -enum pipe pipe) -{ -i915_reg_t reg =PIPEDSL (pipe); -u32 line1, line2; - - line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; -msleep (5 ); - line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; - -return line1 != line2; -} - -static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc,bool state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -enum pipe pipe = crtc->pipe; - -/* Wait for the display line to settle/start moving */ -if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) -drm_err (&dev_priv->drm, -"pipe %c scanline %s wait timed out\n" , -pipe_name (pipe),str_on_off (state)); -} - -static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, false); -} - -static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, true); -} -static void intel_wait_for_pipe_off (const struct intel_crtc_state *old_crtc_state) { diff --git
a/drivers/gpu/drm/i915/display/intel_vblank.cb/drivers/gpu/drm/i915/display/intel_vblank.c
index78a579496ad1..f25ec643a0a3100644drivers/gpu/drm/i915/display/intel_vblank.c +18
-0@@ -417,3 +417,38 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)return position; } + +static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, +enum pipe pipe) +{ +i915_reg_t reg =PIPEDSL (pipe); +u32 line1, line2; + + line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; +msleep (5 ); + line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; + +return line1 != line2; +} + +static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc,bool +state) { +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +enum pipe pipe = crtc->pipe;
drivers/gpu/drm/i915/display/intel_vblank.c int intel_get_crtc_scanline(struct intel_crtc *crtc) · line 447
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_vblank.c +10
-0+ +/* Wait for the display line to settle/start moving */ +if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) +drm_err (&dev_priv->drm, +"pipe %c scanline %s wait timed out\n" , +pipe_name (pipe),str_on_off (state)); } + +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, false); } +
Is this wrapper function required, since nothing else is being other than calling the function wait_for_pipe_scanline_moving, can this be replaced?
Thanks and Regards,
Arun R Murthy
--------------------
Quoted 17 lines
drivers/gpu/drm/i915/display/intel_vblank.c +2
-0+void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, true); }drivers/gpu/drm/i915/display/intel_vblank.h +2
-1@@ -17,5 +17,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc);bool intel_crtc_get_vblank_timestamp (struct drm_crtc *crtc,int *max_error,ktime_t *vblank_time,bool in_vblank_irq);int intel_get_crtc_scanline (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc);#endif /* __INTEL_VBLANK_H__ */ --2.34.1
Re: [Intel-gfx] [PATCH 4/7] drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch]
In reply to Jani NikulaQuoted 9 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 4/7] drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch]
Quoted 7 lines
Let's not have scanline waits inline in hdmi code.
This kind of waits should really have timeouts; add a FIXME comment.
Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>---
Thanks and Regards,
Arun R Murthy
--------------------
Quoted 75 lines
drivers/gpu/drm/i915/display/intel_hdmi.c | 9 ++------- drivers/gpu/drm/i915/display/intel_vblank.c | 14 ++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 1 + 3 files changed, 17 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/display/intel_hdmi.c +1
-0@@ -56,6 +56,7 @@#include "intel_lspcon.h" #include "intel_panel.h" #include "intel_snps_phy.h" +#include "intel_vblank.h" static struct drm_i915_private *intel_hdmi_to_i915 (struct intel_hdmi *intel_hdmi) { @@ -1476,15 +1477,9 @@ static intkbl_repositioning_enc_en_signal(struct
intel_connector*connector,drivers/gpu/drm/i915/display/intel_hdmi.c +0
-0struct drm_i915_private *dev_priv =to_i915 (connector->base.dev); struct intel_digital_port *dig_port =
intel_attached_dig_port(connector);drivers/gpu/drm/i915/display/intel_hdmi.c +1
-7struct intel_crtc *crtc =to_intel_crtc (connector->base.state->crtc); -u32 scanline;int ret; -for (;;) { - scanline =intel_de_read (dev_priv,PIPEDSL (crtc->pipe)); -if (scanline >100 && scanline <200 ) -break ; -usleep_range (25 ,50 ); - } +intel_wait_for_pipe_scanline_range (crtc,100 ,200 ); ret = intel_ddi_toggle_hdcp_bits(&dig_port->base, cpu_transcoder, false,
TRANS_DDI_HDCP_SIGNALLING); diff --gita/drivers/gpu/drm/i915/display/intel_vblank.cb/drivers/gpu/drm/i915/display/intel_vblank.c
indexf25ec643a0a3..aec7758ef917100644drivers/gpu/drm/i915/display/intel_vblank.c +7
-0@@ -452,3 +452,17 @@ void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) {wait_for_pipe_scanline_moving (crtc, true); } + +void intel_wait_for_pipe_scanline_range (struct intel_crtc *crtc,u32 +start,u32 end) { +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +u32 scanline; + +/* FIXME: This needs to timeout and/or check that scanline is moving. */
drivers/gpu/drm/i915/display/intel_vblank.c +7
-0+for (;;) { + scanline =intel_de_read (dev_priv,PIPEDSL (crtc->pipe)); +if (scanline > start && scanline < end) +break ; +usleep_range (25 ,50 ); + } +}drivers/gpu/drm/i915/display/intel_vblank.h +0
-0@@ -19,5 +19,6 @@ bool intel_crtc_get_vblank_timestamp(struct drm_crtc *crtc, int *max_error, int intel_get_crtc_scanline(struct intel_crtc *crtc); void
intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc); voidintel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc);drivers/gpu/drm/i915/display/intel_vblank.h +2
-1+void intel_wait_for_pipe_scanline_range (struct intel_crtc *crtc,u32 +start,u32 end);#endif /* __INTEL_VBLANK_H__ */ --2.34.1
Re: [Intel-gfx] [PATCH 7/7] drm/i915/reg: split out vblank/scanline regs
In reply to Jani NikulaQuoted 8 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 7/7] drm/i915/reg: split out vblank/scanline regs
Quoted 5 lines
Reduce clutter in
i915_reg.hby splitting out the vblank/scanline registers.Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>---
Thanks and Regards,
Arun R Murthy
---------------------
Quoted 210 lines
drivers/gpu/drm/i915/display/intel_crt.c | 1 + drivers/gpu/drm/i915/display/intel_vblank.c | 1 + .../gpu/drm/i915/display/intel_vblank_regs.h | 42 +++++++++++++++++++ drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/display.c | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 35 ---------------- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 8 files changed, 48 insertions(+), 35 deletions(-) create mode 100644
drivers/gpu/drm/i915/display/intel_vblank_regs.hdrivers/gpu/drm/i915/display/intel_crt.c +1
-0@@ -49,6 +49,7 @@#include "intel_hotplug.h" #include "intel_pch_display.h" #include "intel_pch_refclk.h" +#include "intel_vblank_regs.h" /* Here's the desired hotplug mode */ #define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 |\drivers/gpu/drm/i915/display/intel_vblank.c +1
-0@@ -8,6 +8,7 @@#include "intel_de.h" #include "intel_display_types.h" #include "intel_vblank.h" +#include "intel_vblank_regs.h" /* * This timing diagram depicts the video signal in and diff --git
a/drivers/gpu/drm/i915/display/intel_vblank_regs.hb/drivers/gpu/drm/i915/display/intel_vblank_regs.hnew file mode 100644
index 000000000000..a851255ac2f1drivers/gpu/drm/i915/display/intel_vblank_regs.h new file +25
-0@@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2022 Intel Corporation +*/ + +#ifndef __INTEL_VBLANK_REGS_H__ +#define __INTEL_VBLANK_REGS_H__ + +#include "intel_display_reg_defs.h" + +#define _PIPEADSL 0x70000 +#define PIPEDSL_CURR_FIELD REG_BIT(31)/* ctg+ */ +#define PIPEDSL_LINE_MASK REG_GENMASK(19, 0) +#define PIPEDSL (pipe) _MMIO_PIPE2(pipe, _PIPEADSL) + +/* +* The two pipe frame counter registers are not synchronized, so +reading a +* stable value is somewhat tricky. Use: +* +* u64 frame = intel_de_read64_2x32(dev_priv, PIPEFRAMEPIXEL(pipe), +PIPEFRAME(pipe)); */ + +#define _PIPEAFRAMEHIGH 0x70040 +#define PIPEFRAME (pipe) _MMIO_PIPE2(pipe,
_PIPEAFRAMEHIGH)drivers/gpu/drm/i915/display/intel_vblank_regs.h new file +5
-0+#define PIPE_FRAME_HIGH_MASK 0x0000ffff +#define PIPE_FRAME_HIGH_SHIFT 0 + +#define _PIPEAFRAMEPIXEL 0x70044 +#define PIPEFRAMEPIXEL (pipe) _MMIO_PIPE2(pipe,
_PIPEAFRAMEPIXEL)drivers/gpu/drm/i915/display/intel_vblank_regs.h new file +8
-0+#define PIPE_FRAME_LOW_MASK 0xff000000 +#define PIPE_FRAME_LOW_SHIFT 24 +#define PIPE_PIXEL_MASK 0x00ffffff +#define PIPE_PIXEL_SHIFT 0 + +/* GM45+ just has to be different */ +#define _PIPEA_FRMCOUNT_G4X 0x70040 +#define PIPE_FRMCOUNT_G4X (pipe) _MMIO_PIPE2(pipe,
_PIPEA_FRMCOUNT_G4X)drivers/gpu/drm/i915/display/intel_vblank_regs.h new file +6
-0+ +#define _PIPEA_FLIPCOUNT_G4X 0x70044 +#define PIPE_FLIPCOUNT_G4X (pipe) _MMIO_PIPE2(pipe, +_PIPEA_FLIPCOUNT_G4X) + +#endif /* __INTEL_VBLANK_REGS_H__ */ drivers/gpu/drm/i915/gvt/cmd_parser.c +1
-0@@ -38,6 +38,7 @@#include "i915_drv.h" #include "i915_reg.h" +#include "display/intel_vblank_regs.h" #include "gt/intel_engine_regs.h" #include "gt/intel_gpu_commands.h" #include "gt/intel_gt_regs.h" drivers/gpu/drm/i915/gvt/display.c +1
-0@@ -37,6 +37,7 @@#include "gvt.h" #include "display/intel_dpio_phy.h" +#include "display/intel_vblank_regs.h" static int get_edp_pipe(struct intel_vgpu *vgpu) { diff --git
a/drivers/gpu/drm/i915/gvt/handlers.cb/drivers/gpu/drm/i915/gvt/handlers.c
index735fc83e7026..efd613c2e068100644drivers/gpu/drm/i915/gvt/handlers.c +1
-0@@ -45,6 +45,7 @@#include "display/intel_dmc_regs.h" #include "display/intel_dpio_phy.h" #include "display/intel_fbc.h" +#include "display/intel_vblank_regs.h" #include "display/vlv_dsi_pll_regs.h" #include "gt/intel_gt_regs.h" (quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex2b7a63754e4d..f3d9797ceb52100644drivers/gpu/drm/i915/i915_reg.h +0
-3@@ -3489,9 +3489,6 @@/* Display & cursor control */ /* Pipe A */ -#define _PIPEADSL 0x70000 -#define PIPEDSL_CURR_FIELD REG_BIT(31)/* ctg+ */ -#define PIPEDSL_LINE_MASK REG_GENMASK(19, 0)#define _PIPEACONF 0x70008#define PIPECONF_ENABLE REG_BIT(31)#define PIPECONF_DOUBLE_WIDE REG_BIT(30)/* pre- i965 */
drivers/gpu/drm/i915/i915_reg.h +0
-3@@ -3616,9 +3613,6 @@#define PIPE_DSI1_OFFSET 0x7b800#define PIPECONF (pipe) _MMIO_PIPE2(pipe, _PIPEACONF) -#define PIPEDSL (pipe) _MMIO_PIPE2(pipe, _PIPEADSL) -#define PIPEFRAME (pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEHIGH) -#define PIPEFRAMEPIXEL (pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEPIXEL) #define PIPESTAT(pipe) _MMIO_PIPE2(pipe, _PIPEASTAT)#define
_PIPEAGCMAX0x70010drivers/gpu/drm/i915/i915_reg.h +0
-28@@ -4034,35 +4028,6 @@#define WM_LP_SPRITE_MASK REG_GENMASK(10, 0)#define WM_LP_SPRITE (x) REG_FIELD_PREP(WM_LP_SPRITE_MASK, (x)) -/* -* The two pipe frame counter registers are not synchronized, so -* reading a stable value is somewhat tricky. The following code -* should work: -* -* do { -* high1 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >> -* PIPE_FRAME_HIGH_SHIFT; -* low1 = ((INREG(PIPEAFRAMEPIXEL) & PIPE_FRAME_LOW_MASK) >> -* PIPE_FRAME_LOW_SHIFT); -* high2 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >> -* PIPE_FRAME_HIGH_SHIFT); -* } while (high1 != high2); -* frame = (high1 << 8) | low1; -*/ -#define _PIPEAFRAMEHIGH 0x70040 -#define PIPE_FRAME_HIGH_MASK 0x0000ffff -#define PIPE_FRAME_HIGH_SHIFT 0 -#define _PIPEAFRAMEPIXEL 0x70044 -#define PIPE_FRAME_LOW_MASK 0xff000000 -#define PIPE_FRAME_LOW_SHIFT 24 -#define PIPE_PIXEL_MASK 0x00ffffff -#define PIPE_PIXEL_SHIFT 0 -/* GM45+ just has to be different */ -#define _PIPEA_FRMCOUNT_G4X 0x70040 -#define _PIPEA_FLIPCOUNT_G4X 0x70044 -#define PIPE_FRMCOUNT_G4X (pipe) _MMIO_PIPE2(pipe, _PIPEA_FRMCOUNT_G4X) -#define PIPE_FLIPCOUNT_G4X(pipe)_MMIO_PIPE2 (pipe, _PIPEA_FLIPCOUNT_G4X) - /* Cursor A & B regs */#define _CURACNTR 0x70080 /* Old style CUR*CNTR flags (desktop 8xx) */ diff --git
a/drivers/gpu/drm/i915/intel_gvt_mmio_table.cb/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
indexce6b3c3b636a..604cc7ea8dac100644drivers/gpu/drm/i915/intel_gvt_mmio_table.c +1
-1@@ -7,6 +7,7 @@#include "display/intel_backlight_regs.h" #include "display/intel_dmc_regs.h" #include "display/intel_dpio_phy.h" +#include "display/intel_vblank_regs.h" #include "display/vlv_dsi_pll_regs.h" #include "gt/intel_gt_regs.h" #include "gvt/gvt.h" --2.34.1
Re: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
In reply to Murthy, Arun RQuoted 105 lines · Arun R
Quoted 105 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Reduce clutter in
intel_display.cby moving the scanline moving/stopped wait functions to intel_vblank.[ch].Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 36 +------------------- drivers/gpu/drm/i915/display/intel_vblank.c | 35 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 2 ++ 3 files changed, 38 insertions(+), 35 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-33@@ -115,6 +115,7 @@#include "intel_quirks.h" #include "intel_sprite.h" #include "intel_tc.h" +#include "intel_vblank.h" #include "intel_vga.h" #include "i9xx_plane.h" #include "skl_scaler.h" @@ -386,41 +387,6 @@ struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)return to_intel_crtc (crtc_state->uapi.crtc); } -static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, -enum pipe pipe) -{ -i915_reg_t reg =PIPEDSL (pipe); -u32 line1, line2; - - line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; -msleep (5 ); - line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; - -return line1 != line2; -} - -static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc,bool state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -enum pipe pipe = crtc->pipe; - -/* Wait for the display line to settle/start moving */ -if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) -drm_err (&dev_priv->drm, -"pipe %c scanline %s wait timed out\n" , -pipe_name (pipe),str_on_off (state)); -} - -static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, false); -} - -static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, true); -} -static void intel_wait_for_pipe_off (const struct intel_crtc_state *old_crtc_state) { diff --git
a/drivers/gpu/drm/i915/display/intel_vblank.cb/drivers/gpu/drm/i915/display/intel_vblank.c
index78a579496ad1..f25ec643a0a3100644drivers/gpu/drm/i915/display/intel_vblank.c +23
-0@@ -417,3 +417,38 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)return position; } + +static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, +enum pipe pipe) +{ +i915_reg_t reg =PIPEDSL (pipe); +u32 line1, line2; + + line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; +msleep (5 ); + line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; + +return line1 != line2; +} + +static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc,bool +state) { +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +enum pipe pipe = crtc->pipe; + +/* Wait for the display line to settle/start moving */ +if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) + drm_err(&dev_priv->drm, + "pipe %c scanline %s wait timed out\n",
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_vblank.c int intel_get_crtc_scanline(struct intel_crtc *crtc) · line 447
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_vblank.c +5
-0+ pipe_name(pipe), str_on_off(state)); } + +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, false); } +Is this wrapper function required, since nothing else is being other than calling the function
wait_for_pipe_scanline_moving, can this be replaced?
Well, first, this patch is only about code *movement*. Any changes like that would have to be separate.
And how would you propose to drop the wrapper? The wrappers are all about readability in the caller side:
intel_wait_for_pipe_scanline_stopped(crtc)
vs.
intel_wait_for_pipe_scanline_moving(crtc, false)
BR,
Jani.
Quoted 23 lines
Thanks and Regards,
Arun R Murthy
--------------------Quoted 17 lines
drivers/gpu/drm/i915/display/intel_vblank.c +2
-0+void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, true); }drivers/gpu/drm/i915/display/intel_vblank.h +2
-1@@ -17,5 +17,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc);bool intel_crtc_get_vblank_timestamp (struct drm_crtc *crtc,int *max_error,ktime_t *vblank_time,bool in_vblank_irq);int intel_get_crtc_scanline (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc);#endif /* __INTEL_VBLANK_H__ */ --2.34.1
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Quoted 9 lines · Arun R
Quoted 9 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 0/7] drm/i915: extract vblank/scanline code to a separate file
Quoted 7 lines
Quoted 5 lines
Add new intel_vblank.[ch] and dump a bunch of the vblank/scanline code there.
Jani Nikula (7):
drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]Can the function naming convention such as
i915_get_vblank_counterbe changed tointel_get_vblank_counterin the same series?
In this case i915_ is a platform prefix, contrast with g4x_get_vblank_counter().
There's more naming to be sorted out, and I wanted to see what the response was to this split with the scanline functions being included here before embarking on doing a bunch of tedious renames.
BR,
Jani.
Quoted 38 lines
Thanks and Regards,
Arun R Murthy
--------------------Quoted 32 lines
drm/i915/display: move more scanline functions to intel_vblank.[ch] drm/i915/display: use common function for checking scanline is moving drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch] drm/i915/vblank: use
intel_de_read()
drm/i915/vblank: add and useintel_de_read64_2x32()to read vblank
counter
drm/i915/reg: split out vblank/scanline regsdrivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_crt.c | 1 + drivers/gpu/drm/i915/display/intel_crtc.c | 1 + drivers/gpu/drm/i915/display/intel_de.h | 7 + drivers/gpu/drm/i915/display/intel_display.c | 54 +-- .../drm/i915/display/intel_display_trace.h | 1 + drivers/gpu/drm/i915/display/intel_hdmi.c | 9 +- drivers/gpu/drm/i915/display/intel_vblank.c | 456 ++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 24 + .../gpu/drm/i915/display/intel_vblank_regs.h | 42 ++ drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/display.c | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/i915_irq.c | 408 ---------------- drivers/gpu/drm/i915/i915_irq.h | 6 - drivers/gpu/drm/i915/i915_reg.h | 35 -- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 17 files changed, 541 insertions(+), 508 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.c create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.h create mode 100644 drivers/gpu/drm/i915/display/intel_vblank_regs.h--
2.34.1
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 7/7] drm/i915/reg: split out vblank/scanline regs
In reply to Jani NikulaQuoted 22 lines · Jani Nikula
Reduce clutter in
i915_reg.hby splitting out the vblank/scanline registers.Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/display/intel_crt.c | 1 + drivers/gpu/drm/i915/display/intel_vblank.c | 1 + .../gpu/drm/i915/display/intel_vblank_regs.h | 42 +++++++++++++++++++ drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/display.c | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 35 ---------------- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 8 files changed, 48 insertions(+), 35 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_vblank_regs.hdrivers/gpu/drm/i915/display/intel_crt.c +0
-0
drivers/gpu/drm/i915/display/intel_crt.c line 52
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_crt.c +1
-0@@ -49,6 +49,7 @@#include "intel_hotplug.h" #include "intel_pch_display.h" #include "intel_pch_refclk.h" +#include "intel_vblank_regs.h"
That doesn't match any actual hardware block structure so not really a fan. We could perhaps try something like intel_{pipe,transcoder}_regs.h, but IIRC some of the registers have more or less been moved between the pipe vs. transcoder so not sure that makes total sense either. Perhaps just intel_de_regs.h/etc. could be sufficient for most things on this level?
Quoted 173 lines
drivers/gpu/drm/i915/display/intel_crt.c +0
-0/* Here's the desired hotplug mode */ #define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 | \drivers/gpu/drm/i915/display/intel_vblank.c +1
-0@@ -8,6 +8,7 @@#include "intel_de.h" #include "intel_display_types.h" #include "intel_vblank.h" +#include "intel_vblank_regs.h" /* * This timing diagram depicts the video signal in and drivers/gpu/drm/i915/display/intel_vblank_regs.h new file +42
-0@@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2022 Intel Corporation +*/ + +#ifndef __INTEL_VBLANK_REGS_H__ +#define __INTEL_VBLANK_REGS_H__ + +#include "intel_display_reg_defs.h" + +#define _PIPEADSL 0x70000 +#define PIPEDSL_CURR_FIELD REG_BIT(31)/* ctg+ */ +#define PIPEDSL_LINE_MASK REG_GENMASK(19, 0) +#define PIPEDSL (pipe) _MMIO_PIPE2(pipe, _PIPEADSL) + +/* +* The two pipe frame counter registers are not synchronized, so reading a +* stable value is somewhat tricky. Use: +* +* u64 frame = intel_de_read64_2x32(dev_priv, PIPEFRAMEPIXEL(pipe), PIPEFRAME(pipe)); +*/ + +#define _PIPEAFRAMEHIGH 0x70040 +#define PIPEFRAME (pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEHIGH) +#define PIPE_FRAME_HIGH_MASK 0x0000ffff +#define PIPE_FRAME_HIGH_SHIFT 0 + +#define _PIPEAFRAMEPIXEL 0x70044 +#define PIPEFRAMEPIXEL (pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEPIXEL) +#define PIPE_FRAME_LOW_MASK 0xff000000 +#define PIPE_FRAME_LOW_SHIFT 24 +#define PIPE_PIXEL_MASK 0x00ffffff +#define PIPE_PIXEL_SHIFT 0 + +/* GM45+ just has to be different */ +#define _PIPEA_FRMCOUNT_G4X 0x70040 +#define PIPE_FRMCOUNT_G4X (pipe) _MMIO_PIPE2(pipe, _PIPEA_FRMCOUNT_G4X) + +#define _PIPEA_FLIPCOUNT_G4X 0x70044 +#define PIPE_FLIPCOUNT_G4X (pipe) _MMIO_PIPE2(pipe, _PIPEA_FLIPCOUNT_G4X) + +#endif /* __INTEL_VBLANK_REGS_H__ */ drivers/gpu/drm/i915/gvt/cmd_parser.c +1
-0@@ -38,6 +38,7 @@#include "i915_drv.h" #include "i915_reg.h" +#include "display/intel_vblank_regs.h" #include "gt/intel_engine_regs.h" #include "gt/intel_gpu_commands.h" #include "gt/intel_gt_regs.h" drivers/gpu/drm/i915/gvt/display.c +1
-0@@ -37,6 +37,7 @@#include "gvt.h" #include "display/intel_dpio_phy.h" +#include "display/intel_vblank_regs.h" static int get_edp_pipe (struct intel_vgpu *vgpu) {drivers/gpu/drm/i915/gvt/handlers.c +1
-0@@ -45,6 +45,7 @@#include "display/intel_dmc_regs.h" #include "display/intel_dpio_phy.h" #include "display/intel_fbc.h" +#include "display/intel_vblank_regs.h" #include "display/vlv_dsi_pll_regs.h" #include "gt/intel_gt_regs.h" drivers/gpu/drm/i915/i915_reg.h +0
-35@@ -3489,9 +3489,6 @@/* Display & cursor control */ /* Pipe A */ -#define _PIPEADSL 0x70000 -#define PIPEDSL_CURR_FIELD REG_BIT(31)/* ctg+ */ -#define PIPEDSL_LINE_MASK REG_GENMASK(19, 0)#define _PIPEACONF 0x70008#define PIPECONF_ENABLE REG_BIT(31)#define PIPECONF_DOUBLE_WIDE REG_BIT(30)/* pre-i965 */ @@ -3616,9 +3613,6 @@#define PIPE_DSI1_OFFSET 0x7b800#define PIPECONF (pipe) _MMIO_PIPE2(pipe, _PIPEACONF) -#define PIPEDSL (pipe) _MMIO_PIPE2(pipe, _PIPEADSL) -#define PIPEFRAME (pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEHIGH) -#define PIPEFRAMEPIXEL (pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEPIXEL)#define PIPESTAT (pipe) _MMIO_PIPE2(pipe, _PIPEASTAT)#define _PIPEAGCMAX 0x70010@@ -4034,35 +4028,6 @@#define WM_LP_SPRITE_MASK REG_GENMASK(10, 0)#define WM_LP_SPRITE (x) REG_FIELD_PREP(WM_LP_SPRITE_MASK, (x)) -/* -* The two pipe frame counter registers are not synchronized, so -* reading a stable value is somewhat tricky. The following code -* should work: -* -* do { -* high1 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >> -* PIPE_FRAME_HIGH_SHIFT; -* low1 = ((INREG(PIPEAFRAMEPIXEL) & PIPE_FRAME_LOW_MASK) >> -* PIPE_FRAME_LOW_SHIFT); -* high2 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >> -* PIPE_FRAME_HIGH_SHIFT); -* } while (high1 != high2); -* frame = (high1 << 8) | low1; -*/ -#define _PIPEAFRAMEHIGH 0x70040 -#define PIPE_FRAME_HIGH_MASK 0x0000ffff -#define PIPE_FRAME_HIGH_SHIFT 0 -#define _PIPEAFRAMEPIXEL 0x70044 -#define PIPE_FRAME_LOW_MASK 0xff000000 -#define PIPE_FRAME_LOW_SHIFT 24 -#define PIPE_PIXEL_MASK 0x00ffffff -#define PIPE_PIXEL_SHIFT 0 -/* GM45+ just has to be different */ -#define _PIPEA_FRMCOUNT_G4X 0x70040 -#define _PIPEA_FLIPCOUNT_G4X 0x70044 -#define PIPE_FRMCOUNT_G4X (pipe) _MMIO_PIPE2(pipe, _PIPEA_FRMCOUNT_G4X) -#define PIPE_FLIPCOUNT_G4X (pipe) _MMIO_PIPE2(pipe, _PIPEA_FLIPCOUNT_G4X) -/* Cursor A & B regs */ #define _CURACNTR 0x70080/* Old style CUR*CNTR flags (desktop 8xx) */ drivers/gpu/drm/i915/intel_gvt_mmio_table.c +1
-0@@ -7,6 +7,7 @@#include "display/intel_backlight_regs.h" #include "display/intel_dmc_regs.h" #include "display/intel_dpio_phy.h" +#include "display/intel_vblank_regs.h" #include "display/vlv_dsi_pll_regs.h" #include "gt/intel_gt_regs.h" #include "gvt/gvt.h" Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä Intel
Re: [Intel-gfx] [PATCH 4/7] drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch]
In reply to Jani NikulaQuoted 48 lines · Jani Nikula
Let's not have scanline waits inline in hdmi code.
This kind of waits should really have timeouts; add a FIXME comment.
Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/display/intel_hdmi.c | 9 ++------- drivers/gpu/drm/i915/display/intel_vblank.c | 14 ++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 1 + 3 files changed, 17 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/display/intel_hdmi.c +2
-7@@ -56,6 +56,7 @@#include "intel_lspcon.h" #include "intel_panel.h" #include "intel_snps_phy.h" +#include "intel_vblank.h" static struct drm_i915_private *intel_hdmi_to_i915 (struct intel_hdmi *intel_hdmi) {@@ -1476,15 +1477,9 @@ static int kbl_repositioning_enc_en_signal(struct intel_connector *connector,struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);struct intel_digital_port *dig_port =intel_attached_dig_port (connector);struct intel_crtc *crtc =to_intel_crtc (connector->base.state->crtc); -u32 scanline;int ret; -for (;;) { - scanline =intel_de_read (dev_priv,PIPEDSL (crtc->pipe)); -if (scanline >100 && scanline <200 ) -break ; -usleep_range (25 ,50 ); - } +intel_wait_for_pipe_scanline_range (crtc,100 ,200 ); ret =intel_ddi_toggle_hdcp_bits (&dig_port->base, cpu_transcoder, false,TRANS_DDI_HDCP_SIGNALLING );drivers/gpu/drm/i915/display/intel_vblank.c +0
-0@@ -452,3 +452,17 @@ void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) {wait_for_pipe_scanline_moving (crtc, true);
drivers/gpu/drm/i915/display/intel_vblank.c void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) · line 463
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_vblank.c +9
-0} + +void intel_wait_for_pipe_scanline_range (struct intel_crtc *crtc,u32 start,u32 end) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +u32 scanline; + +/* FIXME: This needs to timeout and/or check that scanline is moving. */ +for (;;) { + scanline =intel_de_read (dev_priv,PIPEDSL (crtc->pipe));
If we want to advertise this as any kind of official thing then it should really use intel_get_crtc_scanline() which eg. accounts for crtc->scanline_offset.
But I have no solid idea what this thing is even trying to do. There is one workaround I see that says some hdcp bits must be toggled during a single frame, and if this is that then it should probably be rewritten to make proper sense, or at least it should have a comment stating what the heck it's trying to do.
Quoted 18 lines
drivers/gpu/drm/i915/display/intel_vblank.c +5
-0+if (scanline > start && scanline < end) +break ; +usleep_range (25 ,50 ); + } +}drivers/gpu/drm/i915/display/intel_vblank.h +1
-0@@ -19,5 +19,6 @@ bool intel_crtc_get_vblank_timestamp(struct drm_crtc *crtc, int *max_error,int intel_get_crtc_scanline (struct intel_crtc *crtc);void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc);void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_range (struct intel_crtc *crtc,u32 start,u32 end);#endif /* __INTEL_VBLANK_H__ */ Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä Intel
Quoted 26 lines
-----Original Message-----
From: Nikula, Jani <[email protected]>
Sent: Wednesday, December 14, 2022 2:49 PM
To: Murthy, Arun R <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 0/7] drm/i915: extract vblank/scanline code to a separate fileQuoted 9 lines · Arun R
Quoted 9 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 0/7] drm/i915: extract vblank/scanline code to a separate fileQuoted 7 lines
Quoted 5 lines
Add new intel_vblank.[ch] and dump a bunch of the vblank/scanline code there.
Jani Nikula (7):
drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]Can the function naming convention such as
i915_get_vblank_counterbe changed tointel_get_vblank_counterin the same series?
Quoted 7 lines
In this case
i915_is a platform prefix, contrast withg4x_get_vblank_counter().There's more naming to be sorted out, and I wanted to see what the response was to this split with the scanline functions being included here before embarking on doing a bunch of tedious renames.
Just commented to see if these changes are coming in the same series. Understand that its more tedious and will be taken later. Thanks for the clarification.
Thanks and Regards,
Arun R Murthy
--------------------
Quoted 45 lines
BR,
Jani.Quoted 21 lines
Thanks and Regards,
Arun R Murthy
--------------------Quoted 16 lines
drm/i915/display: move more scanline functions to intel_vblank.[ch] drm/i915/display: use common function for checking scanline is moving drm/i915/hdmi: abstract scanline range wait into intel_vblank.[ch] drm/i915/vblank: use
intel_de_read()
drm/i915/vblank: add and useintel_de_read64_2x32()to read vblank
counter
drm/i915/reg: split out vblank/scanline regsdrivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_crt.c | 1 + drivers/gpu/drm/i915/display/intel_crtc.c | 1 + drivers/gpu/drm/i915/display/intel_de.h | 7 + drivers/gpu/drm/i915/display/intel_display.c | 54 +-- .../drm/i915/display/intel_display_trace.h | 1 + drivers/gpu/drm/i915/display/intel_hdmi.c | 9 +- drivers/gpu/drm/i915/display/intel_vblank.c | 456++++++++++++++++++
Quoted 14 lines
Quoted 14 lines
drivers/gpu/drm/i915/display/intel_vblank.h | 24 + .../gpu/drm/i915/display/intel_vblank_regs.h | 42 ++ drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/display.c | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/i915_irq.c | 408 ---------------- drivers/gpu/drm/i915/i915_irq.h | 6 - drivers/gpu/drm/i915/i915_reg.h | 35 -- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 17 files changed, 541 insertions(+), 508 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.c create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.h create mode 100644 drivers/gpu/drm/i915/display/intel_vblank_regs.hQuoted 3 lines
Quoted 2 lines
--
2.34.1--
Jani Nikula, Intel Open Source Graphics Center
Murthy, Arun R
Reviewed-byRe: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
In reply to Jani NikulaQuoted 126 lines
-----Original Message-----
From: Nikula, Jani <[email protected]>
Sent: Wednesday, December 14, 2022 2:45 PM
To: Murthy, Arun R <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Quoted 108 lines · Arun R
Quoted 108 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Reduce clutter in
intel_display.cby moving the scanline moving/stopped wait functions to intel_vblank.[ch].Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 36 +------------------- drivers/gpu/drm/i915/display/intel_vblank.c | 35 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 2 ++ 3 files changed, 38 insertions(+), 35 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-32@@ -115,6 +115,7 @@#include "intel_quirks.h" #include "intel_sprite.h" #include "intel_tc.h" +#include "intel_vblank.h" #include "intel_vga.h" #include "i9xx_plane.h" #include "skl_scaler.h" @@ -386,41 +387,6 @@ struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)return to_intel_crtc (crtc_state->uapi.crtc); } -static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, -enum pipe pipe) -{ -i915_reg_t reg =PIPEDSL (pipe); -u32 line1, line2; - - line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; -msleep (5 ); - line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; - -return line1 != line2; -} - -static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc, bool state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -enum pipe pipe = crtc->pipe; - -/* Wait for the display line to settle/start moving */ -if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) -drm_err (&dev_priv->drm, -"pipe %c scanline %s wait timed out\n" , -pipe_name (pipe),str_on_off (state)); -} - -static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, false); -} - -static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, true); -} -static void intel_wait_for_pipe_off(const struct intel_crtc_state
*old_crtc_state) { diff -- gita/drivers/gpu/drm/i915/display/intel_vblank.cb/drivers/gpu/drm/i915/display/intel_vblank.cindex78a579496ad1..f25ec643a0a3100644drivers/gpu/drm/i915/display/intel_vblank.c +23
-0@@ -417,3 +417,38 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)return position; } + +static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, +enum pipe pipe) { +i915_reg_t reg =PIPEDSL (pipe); +u32 line1, line2; + + line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; +msleep (5 ); + line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; + +return line1 != line2; +} + +static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc, +bool +state) { +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +enum pipe pipe = crtc->pipe; + +/* Wait for the display line to settle/start moving */ +if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) + drm_err(&dev_priv->drm, + "pipe %c scanline %s wait timed out\n",Quoted 8 lines
drivers/gpu/drm/i915/display/intel_vblank.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_vblank.c +5
-0+ pipe_name(pipe), str_on_off(state)); } + +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, false); } +Is this wrapper function required, since nothing else is being other than calling the function
wait_for_pipe_scanline_moving, can this be replaced?
Quoted 3 lines
Well, first, this patch is only about code *movement*. Any changes like that would have to be separate.
Ok.
Quoted 3 lines
And how would you propose to drop the wrapper? The wrappers are all about readability in the caller side:
I didn’t mean to drop the wrapper, understand that wrapper is more readable, what I meant is to replace wait_for_pipe_scanline_moving/stopped with its function contents.
Thanks and Regards,
Arun R Murthy
--------------------
Quoted 36 lines
intel_wait_for_pipe_scanline_stopped(crtc)vs.
intel_wait_for_pipe_scanline_moving(crtc, false)BR,
Jani.Quoted 5 lines
Thanks and Regards,
Arun R Murthy
--------------------Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_vblank.c +2
-0+void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, true); }drivers/gpu/drm/i915/display/intel_vblank.h +0
-0@@ -17,5 +17,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc);bool intel_crtc_get_vblank_timestamp(struct
drm_crtc*crtc, int
*max_error,Quoted 9 lines
Quoted 8 lines
ktime_t*vblank_time, boolin_vblank_irq); intintel_get_crtc_scanline(struct intel_crtc *crtc);drivers/gpu/drm/i915/display/intel_vblank.h +2
-1+void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc);#endif /* __INTEL_VBLANK_H__ */ --2.34.1
--
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
Quoted 129 lines · Arun R
Quoted 126 lines
-----Original Message-----
From: Nikula, Jani <[email protected]>
Sent: Wednesday, December 14, 2022 2:45 PM
To: Murthy, Arun R <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Quoted 108 lines · Arun R
Quoted 108 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Reduce clutter in
intel_display.cby moving the scanline moving/stopped wait functions to intel_vblank.[ch].Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 36 +------------------- drivers/gpu/drm/i915/display/intel_vblank.c | 35 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vblank.h | 2 ++ 3 files changed, 38 insertions(+), 35 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-32@@ -115,6 +115,7 @@#include "intel_quirks.h" #include "intel_sprite.h" #include "intel_tc.h" +#include "intel_vblank.h" #include "intel_vga.h" #include "i9xx_plane.h" #include "skl_scaler.h" @@ -386,41 +387,6 @@ struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)return to_intel_crtc (crtc_state->uapi.crtc); } -static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, -enum pipe pipe) -{ -i915_reg_t reg =PIPEDSL (pipe); -u32 line1, line2; - - line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; -msleep (5 ); - line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; - -return line1 != line2; -} - -static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc, bool state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -enum pipe pipe = crtc->pipe; - -/* Wait for the display line to settle/start moving */ -if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) -drm_err (&dev_priv->drm, -"pipe %c scanline %s wait timed out\n" , -pipe_name (pipe),str_on_off (state)); -} - -static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, false); -} - -static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) -{ -wait_for_pipe_scanline_moving (crtc, true); -} -static void intel_wait_for_pipe_off(const struct intel_crtc_state
*old_crtc_state) { diff -- gita/drivers/gpu/drm/i915/display/intel_vblank.cb/drivers/gpu/drm/i915/display/intel_vblank.cindex78a579496ad1..f25ec643a0a3100644drivers/gpu/drm/i915/display/intel_vblank.c +23
-0@@ -417,3 +417,38 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)return position; } + +static bool pipe_scanline_is_moving (struct drm_i915_private *dev_priv, +enum pipe pipe) { +i915_reg_t reg =PIPEDSL (pipe); +u32 line1, line2; + + line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; +msleep (5 ); + line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; + +return line1 != line2; +} + +static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc, +bool +state) { +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +enum pipe pipe = crtc->pipe; + +/* Wait for the display line to settle/start moving */ +if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) + drm_err(&dev_priv->drm, + "pipe %c scanline %s wait timed out\n",Quoted 8 lines
drivers/gpu/drm/i915/display/intel_vblank.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_vblank.c +5
-0+ pipe_name(pipe), str_on_off(state)); } + +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, false); } +Is this wrapper function required, since nothing else is being other than calling the function
wait_for_pipe_scanline_moving, can this be replaced?Quoted 3 lines
Well, first, this patch is only about code *movement*. Any changes like that would have to be separate.
Quoted 7 lines
Ok.
Reviewed-by Arun R Murthy <[email protected]>Quoted 3 lines
And how would you propose to drop the wrapper? The wrappers are all about readability in the caller side:
I didn’t mean to drop the wrapper, understand that wrapper is more readable, what I meant is to replace wait_for_pipe_scanline_moving/stopped with its function contents.
Why should we duplicate the code?
BR,
Jani.
Quoted 40 lines
Thanks and Regards,
Arun R Murthy
--------------------Quoted 36 lines
intel_wait_for_pipe_scanline_stopped(crtc)vs.
intel_wait_for_pipe_scanline_moving(crtc, false)BR,
Jani.Quoted 5 lines
Thanks and Regards,
Arun R Murthy
--------------------Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_vblank.c +2
-0+void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, true); }drivers/gpu/drm/i915/display/intel_vblank.h +0
-0@@ -17,5 +17,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc);bool intel_crtc_get_vblank_timestamp(struct
drm_crtc*crtc, int
*max_error,Quoted 9 lines
Quoted 8 lines
ktime_t*vblank_time, boolin_vblank_irq); intintel_get_crtc_scanline(struct intel_crtc *crtc);drivers/gpu/drm/i915/display/intel_vblank.h +2
-1+void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc); +void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc);#endif /* __INTEL_VBLANK_H__ */ --2.34.1
--
Jani Nikula, Intel Open Source Graphics Center
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
Quoted 149 lines
-----Original Message-----
From: Nikula, Jani <[email protected]>
Sent: Thursday, December 15, 2022 2:43 PM
To: Murthy, Arun R <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Quoted 9 lines · Arun R
Quoted 9 lines
-----Original Message-----
From: Nikula, Jani <[email protected]>
Sent: Wednesday, December 14, 2022 2:45 PM
To: Murthy, Arun R <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]On Wed, 14 Dec 2022, "Murthy, Arun R" <[email protected]>
Quoted 12 lines · wrote:
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Jani Nikula
Sent: Monday, December 12, 2022 7:59 PM
To: [email protected]
Cc: Nikula, Jani <[email protected]>
Subject: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Reduce clutter in
intel_display.cby moving the scanline moving/stopped wait functions to intel_vblank.[ch].Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Cc Ville Syrjälä <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 36 +------------------- drivers/gpu/drm/i915/display/intel_vblank.c +|35 +++++++++++++++++++
drivers/gpu/drm/i915/display/intel_vblank.hQuoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
|
2 ++3 files changed, 38 insertions(+), 35 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-0@@ -115,6 +115,7 @@#include "intel_quirks.h" #include "intel_sprite.h" #include "intel_tc.h" +#include "intel_vblank.h" #include "intel_vga.h" #include "i9xx_plane.h" #include "skl_scaler.h" @@ -386,41 +387,6 @@ struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)return to_intel_crtc (crtc_state->uapi.crtc); }Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c struct intel_crtc *intel_master_crtc(const · line 390
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +0
-1-static bool pipe_scanline_is_moving(struct drm_i915_private
*dev_priv,Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-16- enum pipe pipe) -{ -i915_reg_t reg =PIPEDSL (pipe); -u32 line1, line2; - - line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; -msleep (5 ); - line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; - -return line1 != line2; -} - -static void wait_for_pipe_scanline_moving (struct intel_crtc *crtc, bool state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -enum pipe pipe = crtc->pipe; -Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-8-/* Wait for the display line to settle/start moving */ -if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) -drm_err (&dev_priv->drm, -"pipe %c scanline %s wait timed out\n" , -pipe_name (pipe),str_on_off (state)); -} - -static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc*crtc) -{
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state) · line 419
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-4-wait_for_pipe_scanline_moving (crtc, false); -} - -static void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc)-{
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-3-wait_for_pipe_scanline_moving (crtc, true); -} -static void intel_wait_for_pipe_off(const struct intel_crtc_state
*old_crtc_state) { diff -- gita/drivers/gpu/drm/i915/display/intel_vblank.cb/drivers/gpu/drm/i915/display/intel_vblank.c
index78a579496ad1..f25ec643a0a3100644drivers/gpu/drm/i915/display/intel_vblank.c +0
-0@@ -417,3 +417,38 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_vblank.c int intel_get_crtc_scanline(struct intel_crtc *crtc)
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_vblank.c +2
-0return position; } + +static bool pipe_scanline_is_moving(struct drm_i915_private
*dev_priv,Quoted 36 lines
Quoted 30 lines
Quoted 21 lines
Quoted 21 lines
drivers/gpu/drm/i915/display/intel_vblank.c +21
-0+ enum pipe pipe) { +i915_reg_t reg =PIPEDSL (pipe); +u32 line1, line2; + + line1 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; +msleep (5 ); + line2 =intel_de_read (dev_priv, reg) &PIPEDSL_LINE_MASK ; + +return line1 != line2; +} + +static void wait_for_pipe_scanline_moving (struct intel_crtc +*crtc,bool +state) { +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +enum pipe pipe = crtc->pipe; + +/* Wait for the display line to settle/start moving */ +if (wait_for (pipe_scanline_is_moving (dev_priv, pipe) == state,100 )) + drm_err(&dev_priv->drm, + "pipe %c scanline %s wait timed out\n",Quoted 8 lines
drivers/gpu/drm/i915/display/intel_vblank.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_vblank.c +5
-0+ pipe_name(pipe), str_on_off(state)); } + +void intel_wait_for_pipe_scanline_stopped (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, false); } +Is this wrapper function required, since nothing else is being other than calling the function
wait_for_pipe_scanline_moving, can this be replaced?Quoted 3 lines
Well, first, this patch is only about code *movement*. Any changes like that would have to be separate.
Ok.
Reviewed-by Arun R Murthy <[email protected]>
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
And how would you propose to drop the wrapper? The wrappers are all about readability in the caller side:
I didn’t mean to drop the wrapper, understand that wrapper is more
readable, what I meant is to replace wait_for_pipe_scanline_moving/stopped with its function contents.
Why should we duplicate the code?
static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) {
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
enum pipe pipe = crtc->pipe
/* Wait for the display line to settle/start moving */
if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state, 100))
drm_err(&dev_priv->drm,
"pipe %c scanline %s wait timed out\n",
pipe_name(pipe), str_on_off(state));
}Quoted 50 lines
BR,
Jani.Quoted 43 lines
Thanks and Regards,
Arun R Murthy
--------------------Quoted 39 lines
intel_wait_for_pipe_scanline_stopped(crtc)vs.
intel_wait_for_pipe_scanline_moving(crtc, false)BR,
Jani.Quoted 5 lines
Thanks and Regards,
Arun R Murthy
--------------------Quoted 10 lines
drivers/gpu/drm/i915/display/intel_vblank.h u32 g4x_get_vblank_counter(struct drm_crtc · line 18
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_vblank.c +2
-0+void intel_wait_for_pipe_scanline_moving (struct intel_crtc *crtc) { +wait_for_pipe_scanline_moving (crtc, true); }drivers/gpu/drm/i915/display/intel_vblank.h +0
-0@@ -17,5 +17,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc); bool intel_crtc_get_vblank_timestamp(struct drm_crtc *crtc, int
*max_error,Quoted 11 lines
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_vblank.h +0
-0ktime_t *vblank_time, bool
in_vblank_irq); intintel_get_crtc_scanline(struct intel_crtc *crtc);drivers/gpu/drm/i915/display/intel_vblank.h +3
-1+void intel_wait_for_pipe_scanline_stopped (struct intel_crtc +*crtc);void intel_wait_for_pipe_scanline_moving (struct +intel_crtc *crtc);#endif /* __INTEL_VBLANK_H__ */ --2.34.1
--
Jani Nikula, Intel Open Source Graphics Center--
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
Quoted 9 lines · Arun R
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
And how would you propose to drop the wrapper? The wrappers are all about readability in the caller side:
I didn’t mean to drop the wrapper, understand that wrapper is more
readable, what I meant is to replace wait_for_pipe_scanline_moving/stopped with its function contents.
Why should we duplicate the code?
Quoted 11 lines
static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) {
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
enum pipe pipe = crtc->pipe
/* Wait for the display line to settle/start moving */
if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state, 100))
drm_err(&dev_priv->drm,
"pipe %c scanline %s wait timed out\n",
pipe_name(pipe), str_on_off(state));
}And the state variable comes from where?
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
Quoted 8 lines
-----Original Message-----
From: Nikula, Jani <[email protected]>
Sent: Thursday, December 15, 2022 3:50 PM
To: Murthy, Arun R <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
Quoted 11 lines
Quoted 10 lines · Arun R
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
And how would you propose to drop the wrapper? The wrappers are all about readability in the caller side:
I didn’t mean to drop the wrapper, understand that wrapper is more
readable, what I meant is to replace wait_for_pipe_scanline_moving/stopped with its function contents.
Why should we duplicate the code?
static void
intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc){
Bool state can be added as a parameter to this function, on the other hand, can have state = false as a magic value as well.
Thanks and Regards,
Arun R Murthy
-------------------
Quoted 19 lines
Quoted 10 lines
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum pipe pipe = crtc->pipe /* Wait for the display line to settle/start moving */ if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state,100))
drm_err(&dev_priv->drm, "pipe %c scanline %s wait timed out\n", pipe_name(pipe), str_on_off(state)); }And the state variable comes from where?
BR,
Jani.--
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]
Quoted 12 lines · Arun R
Quoted 12 lines
-----Original Message-----
From: Nikula, Jani <[email protected]>
Sent: Thursday, December 15, 2022 3:50 PM
To: Murthy, Arun R <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch]Quoted 3 lines · Arun R
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
And how would you propose to drop the wrapper? The wrappers are all about readability in the caller side:
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
I didn’t mean to drop the wrapper, understand that wrapper is more
readable, what I meant is to replace wait_for_pipe_scanline_moving/stopped with its function contents.
Why should we duplicate the code?
static void
intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc){Bool state can be added as a parameter to this function, on the other hand, can have state = false as a magic value as well.
Then it boils down to what we already have?
Too much talk now, please send actual working code instead.
BR,
Jani.
Quoted 23 lines
Thanks and Regards,
Arun R Murthy
-------------------Quoted 19 lines
Quoted 10 lines
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum pipe pipe = crtc->pipe /* Wait for the display line to settle/start moving */ if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state,100))
drm_err(&dev_priv->drm, "pipe %c scanline %s wait timed out\n", pipe_name(pipe), str_on_off(state)); }And the state variable comes from where?
BR,
Jani.--
Jani Nikula, Intel Open Source Graphics Center
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center