[Intel-gfx] [PATCH] drm/i915/icl: Fix pipe config mismatch warnings

kbuild test robot lkp at intel.com
Fri Dec 7 16:24:38 UTC 2018


Hi Stanislav,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20181207]
[cannot apply to v4.20-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Stanislav-Lisovskiy/drm-i915-icl-Fix-pipe-config-mismatch-warnings/20181207-234855
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x073-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/icl_dsi.c: In function 'gen11_dsi_calc_transcoder_timings':
>> drivers/gpu/drm/i915/icl_dsi.c:843:6: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
         &pipe_config->base.adjusted_mode;
         ^
   drivers/gpu/drm/i915/icl_dsi.c:845:18: warning: unused variable 'dsi_trans' [-Wunused-variable]
     enum transcoder dsi_trans;
                     ^~~~~~~~~
   drivers/gpu/drm/i915/icl_dsi.c:844:12: warning: unused variable 'port' [-Wunused-variable]
     enum port port;
               ^~~~
   drivers/gpu/drm/i915/icl_dsi.c:840:27: warning: unused variable 'dev_priv' [-Wunused-variable]
     struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
                              ^~~~~~~~

vim +/const +843 drivers/gpu/drm/i915/icl_dsi.c

   834	
   835	static
   836	void
   837	gen11_dsi_calc_transcoder_timings(struct intel_encoder *encoder,
   838					 const struct intel_crtc_state *pipe_config)
   839	{
   840		struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
   841		struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
   842		struct drm_display_mode *adjusted_mode =
 > 843						&pipe_config->base.adjusted_mode;
   844		enum port port;
   845		enum transcoder dsi_trans;
   846		/* horizontal timings */
   847		u16 htotal, hactive, hsync_start, hsync_end, hsync_size;
   848		u16 hfront_porch, hback_porch;
   849		/* vertical timings */
   850		u16 vtotal, vactive, vsync_start, vsync_end, vsync_shift;
   851	
   852		hactive = adjusted_mode->crtc_hdisplay;
   853		htotal = adjusted_mode->crtc_htotal;
   854		hsync_start = adjusted_mode->crtc_hsync_start;
   855		hsync_end = adjusted_mode->crtc_hsync_end;
   856		hsync_size  = hsync_end - hsync_start;
   857		hfront_porch = (adjusted_mode->crtc_hsync_start -
   858				adjusted_mode->crtc_hdisplay);
   859		hback_porch = (adjusted_mode->crtc_htotal -
   860			       adjusted_mode->crtc_hsync_end);
   861		vactive = adjusted_mode->crtc_vdisplay;
   862		vtotal = adjusted_mode->crtc_vtotal;
   863		vsync_start = adjusted_mode->crtc_vsync_start;
   864		vsync_end = adjusted_mode->crtc_vsync_end;
   865		vsync_shift = hsync_start - htotal / 2;
   866	
   867		if (intel_dsi->dual_link) {
   868			hactive /= 2;
   869			if (intel_dsi->dual_link == DSI_DUAL_LINK_FRONT_BACK)
   870				hactive += intel_dsi->pixel_overlap;
   871			htotal /= 2;
   872		}
   873	
   874		/* TRANS_HSYNC register to be programmed only for video mode */
   875		if (intel_dsi->operation_mode == INTEL_DSI_VIDEO_MODE) {
   876	
   877			if (intel_dsi->dual_link) {
   878				hsync_start /= 2;
   879				hsync_end /= 2;
   880			}
   881		}
   882	
   883		adjusted_mode->crtc_hdisplay = hactive;
   884		adjusted_mode->crtc_htotal = htotal;
   885		adjusted_mode->crtc_hsync_start = hsync_start;
   886		adjusted_mode->crtc_hsync_end = hsync_end;
   887		adjusted_mode->crtc_vdisplay = vactive;
   888		adjusted_mode->crtc_vtotal = vtotal;
   889		adjusted_mode->crtc_vsync_start = vsync_start;
   890		adjusted_mode->crtc_vsync_end = vsync_end;
   891	}
   892	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 33754 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20181208/c763a300/attachment-0001.gz>


More information about the Intel-gfx mailing list