Hi Maarten,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-i915/for-linux-next]
[also build test ERROR on drm-i915/for-linux-next-fixes drm-xe/drm-xe-next 
drm-tip/drm-tip next-20251219]
[cannot apply to linus/master v6.16-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Maarten-Lankhorst/drm-i915-display-Fix-intel_lpe_audio_irq_handler-for-PREEMPT-RT/20251216-212722
base:   https://gitlab.freedesktop.org/drm/i915/kernel.git for-linux-next
patch link:    
https://lore.kernel.org/r/20251216092226.1777909-24-dev%40lankhorst.se
patch subject: [i915-rt v2 06/16] drm/i915/display: Remove locking from 
intel_vblank_evade critical section
config: x86_64-rhel-9.4-ltp 
(https://download.01.org/0day-ci/archive/20251222/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251222/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_vblank.c:245:12: error: static 
>> declaration of '__intel_get_crtc_scanline' follows non-static declaration
     245 | static int __intel_get_crtc_scanline(struct intel_crtc *crtc)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/i915/display/intel_vblank.c:19:
   drivers/gpu/drm/i915/display/intel_vblank.h:41:5: note: previous declaration 
of '__intel_get_crtc_scanline' with type 'int(struct intel_crtc *)'
      41 | int __intel_get_crtc_scanline(struct intel_crtc *crtc);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_vblank.c: In function 
'scanline_in_safe_range':
   drivers/gpu/drm/i915/display/intel_vblank.c:716:17: error: implicit 
declaration of function 'intel_vblank_section_enter_irqf'; did you mean 
'intel_vblank_section_enter'? [-Wimplicit-function-declaration]
     716 |                 intel_vblank_section_enter_irqf(display, &irqflags);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 intel_vblank_section_enter
>> drivers/gpu/drm/i915/display/intel_vblank.c:716:49: error: 'display' 
>> undeclared (first use in this function)
     716 |                 intel_vblank_section_enter_irqf(display, &irqflags);
         |                                                 ^~~~~~~
   drivers/gpu/drm/i915/display/intel_vblank.c:716:49: note: each undeclared 
identifier is reported only once for each function it appears in
>> drivers/gpu/drm/i915/display/intel_vblank.c:718:9: error: 'position' 
>> undeclared (first use in this function)
     718 |         position = __intel_get_crtc_scanline(crtc);
         |         ^~~~~~~~
>> drivers/gpu/drm/i915/display/intel_vblank.c:718:46: error: 'crtc' undeclared 
>> (first use in this function)
     718 |         position = __intel_get_crtc_scanline(crtc);
         |                                              ^~~~
   drivers/gpu/drm/i915/display/intel_vblank.c:721:17: error: implicit 
declaration of function 'intel_vblank_section_exit_irqf'; did you mean 
'intel_vblank_section_exit'? [-Wimplicit-function-declaration]
     721 |                 intel_vblank_section_exit_irqf(display, irqflags);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 intel_vblank_section_exit


vim +/__intel_get_crtc_scanline +245 drivers/gpu/drm/i915/display/intel_vblank.c

5b7f65acf1b083 Ville Syrjälä 2024-05-28  240  
62fe4515cf2027 Jani Nikula   2023-01-16  241  /*
62fe4515cf2027 Jani Nikula   2023-01-16  242   * intel_de_read_fw(), only for 
fast reads of display block, no need for
62fe4515cf2027 Jani Nikula   2023-01-16  243   * forcewake etc.
62fe4515cf2027 Jani Nikula   2023-01-16  244   */
62fe4515cf2027 Jani Nikula   2023-01-16 @245  static int 
__intel_get_crtc_scanline(struct intel_crtc *crtc)
62fe4515cf2027 Jani Nikula   2023-01-16  246  {
aa451ae76fda24 Jani Nikula   2024-08-22  247    struct intel_display *display = 
to_intel_display(crtc);
0097ecd06d9dcf Ville Syrjälä 2024-04-08  248    struct drm_vblank_crtc *vblank 
= drm_crtc_vblank_crtc(&crtc->base);
0097ecd06d9dcf Ville Syrjälä 2024-04-08  249    const struct drm_display_mode 
*mode = &vblank->hwmode;
62fe4515cf2027 Jani Nikula   2023-01-16  250    enum pipe pipe = crtc->pipe;
62fe4515cf2027 Jani Nikula   2023-01-16  251    int position, vtotal;
62fe4515cf2027 Jani Nikula   2023-01-16  252  
62fe4515cf2027 Jani Nikula   2023-01-16  253    if (!crtc->active)
62fe4515cf2027 Jani Nikula   2023-01-16  254            return 0;
62fe4515cf2027 Jani Nikula   2023-01-16  255  
62fe4515cf2027 Jani Nikula   2023-01-16  256    if (crtc->mode_flags & 
I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP)
62fe4515cf2027 Jani Nikula   2023-01-16  257            return 
__intel_get_crtc_scanline_from_timestamp(crtc);
62fe4515cf2027 Jani Nikula   2023-01-16  258  
9677dd01ca1ada Ville Syrjälä 2024-05-28  259    vtotal = 
intel_mode_vtotal(mode);
62fe4515cf2027 Jani Nikula   2023-01-16  260  
aa451ae76fda24 Jani Nikula   2024-08-22  261    position = 
intel_de_read_fw(display, PIPEDSL(display, pipe)) & PIPEDSL_LINE_MASK;
62fe4515cf2027 Jani Nikula   2023-01-16  262  
62fe4515cf2027 Jani Nikula   2023-01-16  263    /*
62fe4515cf2027 Jani Nikula   2023-01-16  264     * On HSW, the DSL reg 
(0x70000) appears to return 0 if we
62fe4515cf2027 Jani Nikula   2023-01-16  265     * read it just before the 
start of vblank.  So try it again
62fe4515cf2027 Jani Nikula   2023-01-16  266     * so we don't accidentally end 
up spanning a vblank frame
62fe4515cf2027 Jani Nikula   2023-01-16  267     * increment, causing the 
pipe_update_end() code to squak at us.
62fe4515cf2027 Jani Nikula   2023-01-16  268     *
62fe4515cf2027 Jani Nikula   2023-01-16  269     * The nature of this problem 
means we can't simply check the ISR
62fe4515cf2027 Jani Nikula   2023-01-16  270     * bit and return the vblank 
start value; nor can we use the scanline
62fe4515cf2027 Jani Nikula   2023-01-16  271     * debug register in the 
transcoder as it appears to have the same
62fe4515cf2027 Jani Nikula   2023-01-16  272     * problem.  We may need to 
extend this to include other platforms,
62fe4515cf2027 Jani Nikula   2023-01-16  273     * but so far testing only 
shows the problem on HSW.
62fe4515cf2027 Jani Nikula   2023-01-16  274     */
aa451ae76fda24 Jani Nikula   2024-08-22  275    if (HAS_DDI(display) && 
!position) {
62fe4515cf2027 Jani Nikula   2023-01-16  276            int i, temp;
62fe4515cf2027 Jani Nikula   2023-01-16  277  
62fe4515cf2027 Jani Nikula   2023-01-16  278            for (i = 0; i < 100; 
i++) {
62fe4515cf2027 Jani Nikula   2023-01-16  279                    udelay(1);
aa451ae76fda24 Jani Nikula   2024-08-22  280                    temp = 
intel_de_read_fw(display,
aa451ae76fda24 Jani Nikula   2024-08-22  281                                    
        PIPEDSL(display, pipe)) & PIPEDSL_LINE_MASK;
62fe4515cf2027 Jani Nikula   2023-01-16  282                    if (temp != 
position) {
62fe4515cf2027 Jani Nikula   2023-01-16  283                            
position = temp;
62fe4515cf2027 Jani Nikula   2023-01-16  284                            break;
62fe4515cf2027 Jani Nikula   2023-01-16  285                    }
62fe4515cf2027 Jani Nikula   2023-01-16  286            }
62fe4515cf2027 Jani Nikula   2023-01-16  287    }
62fe4515cf2027 Jani Nikula   2023-01-16  288  
62fe4515cf2027 Jani Nikula   2023-01-16  289    /*
62fe4515cf2027 Jani Nikula   2023-01-16  290     * See update_scanline_offset() 
for the details on the
62fe4515cf2027 Jani Nikula   2023-01-16  291     * scanline_offset adjustment.
62fe4515cf2027 Jani Nikula   2023-01-16  292     */
5316dd0d617bb9 Ville Syrjälä 2024-05-28  293    return (position + vtotal + 
crtc->scanline_offset) % vtotal;
62fe4515cf2027 Jani Nikula   2023-01-16  294  }
62fe4515cf2027 Jani Nikula   2023-01-16  295  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to