tree: git://anongit.freedesktop.org/drm-intel drm-intel-nightly head: 3778ca36c6b4e894b581d4f56abe6bbafe927e96 commit: 196cd5d3758cbf587fc0254cae7132d95993461e [1414/1425] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ config: i386-defconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout 196cd5d3758cbf587fc0254cae7132d95993461e # save the attached .config to linux build tree make ARCH=i386
All warnings (new ones prefixed by >>): drivers/gpu/drm/drm_modes.c: In function 'drm_mode_get_hv_timing': >> drivers/gpu/drm/drm_modes.c:909:20: warning: 'adjusted.base.id' is used >> uninitialized in this function [-Wuninitialized] int id = dst->base.id; ~~~~~~~~~^~~ drivers/gpu/drm/drm_modes.c:811:26: note: 'adjusted' was declared here struct drm_display_mode adjusted; ^~~~~~~~ >> drivers/gpu/drm/drm_modes.c:910:19: warning: 'adjusted' is used >> uninitialized in this function [-Wuninitialized] struct list_head head = dst->head; ^~~~ drivers/gpu/drm/drm_modes.c:811:26: note: 'adjusted' was declared here struct drm_display_mode adjusted; ^~~~~~~~ >> drivers/gpu/drm/drm_modes.c:910:19: warning: '*((void *)&adjusted+4)' is >> used uninitialized in this function [-Wuninitialized] struct list_head head = dst->head; ^~~~ drivers/gpu/drm/drm_modes.c:811:26: note: 'adjusted' was declared here struct drm_display_mode adjusted; ^~~~~~~~ vim +909 drivers/gpu/drm/drm_modes.c 196cd5d3 Daniel Vetter 2017-01-25 805 * The vdisplay value will be doubled if the specified mode is a stereo mode of 196cd5d3 Daniel Vetter 2017-01-25 806 * the appropriate layout. 196cd5d3 Daniel Vetter 2017-01-25 807 */ 196cd5d3 Daniel Vetter 2017-01-25 808 void drm_mode_get_hv_timing(const struct drm_display_mode *mode, 196cd5d3 Daniel Vetter 2017-01-25 809 int *hdisplay, int *vdisplay) 196cd5d3 Daniel Vetter 2017-01-25 810 { 196cd5d3 Daniel Vetter 2017-01-25 @811 struct drm_display_mode adjusted; 196cd5d3 Daniel Vetter 2017-01-25 812 196cd5d3 Daniel Vetter 2017-01-25 813 drm_mode_copy(&adjusted, mode); 196cd5d3 Daniel Vetter 2017-01-25 814 drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY); 196cd5d3 Daniel Vetter 2017-01-25 815 *hdisplay = adjusted.crtc_hdisplay; 196cd5d3 Daniel Vetter 2017-01-25 816 *vdisplay = adjusted.crtc_vdisplay; 196cd5d3 Daniel Vetter 2017-01-25 817 } 196cd5d3 Daniel Vetter 2017-01-25 818 EXPORT_SYMBOL(drm_mode_get_hv_timing); 196cd5d3 Daniel Vetter 2017-01-25 819 196cd5d3 Daniel Vetter 2017-01-25 820 /** f5aabb97 Daniel Vetter 2014-01-23 821 * drm_mode_set_crtcinfo - set CRTC modesetting timing parameters f453ba04 Dave Airlie 2008-11-07 822 * @p: mode 448cce25 Damien Lespiau 2013-09-25 823 * @adjust_flags: a combination of adjustment flags f453ba04 Dave Airlie 2008-11-07 824 * f5aabb97 Daniel Vetter 2014-01-23 825 * Setup the CRTC modesetting timing parameters for @p, adjusting if necessary. 448cce25 Damien Lespiau 2013-09-25 826 * 448cce25 Damien Lespiau 2013-09-25 827 * - The CRTC_INTERLACE_HALVE_V flag can be used to halve vertical timings of 448cce25 Damien Lespiau 2013-09-25 828 * interlaced modes. 448cce25 Damien Lespiau 2013-09-25 829 * - The CRTC_STEREO_DOUBLE flag can be used to compute the timings for 448cce25 Damien Lespiau 2013-09-25 830 * buffers containing two eyes (only adjust the timings when needed, eg. for 448cce25 Damien Lespiau 2013-09-25 831 * "frame packing" or "side by side full"). ecb7e16b Gustavo Padovan 2014-12-01 832 * - The CRTC_NO_DBLSCAN and CRTC_NO_VSCAN flags request that adjustment *not* ecb7e16b Gustavo Padovan 2014-12-01 833 * be performed for doublescan and vscan > 1 modes respectively. f453ba04 Dave Airlie 2008-11-07 834 */ f453ba04 Dave Airlie 2008-11-07 835 void drm_mode_set_crtcinfo(struct drm_display_mode *p, int adjust_flags) f453ba04 Dave Airlie 2008-11-07 836 { f453ba04 Dave Airlie 2008-11-07 837 if ((p == NULL) || ((p->type & DRM_MODE_TYPE_CRTC_C) == DRM_MODE_TYPE_BUILTIN)) f453ba04 Dave Airlie 2008-11-07 838 return; f453ba04 Dave Airlie 2008-11-07 839 bde2dcf7 Damien Lespiau 2013-09-25 840 p->crtc_clock = p->clock; f453ba04 Dave Airlie 2008-11-07 841 p->crtc_hdisplay = p->hdisplay; f453ba04 Dave Airlie 2008-11-07 842 p->crtc_hsync_start = p->hsync_start; f453ba04 Dave Airlie 2008-11-07 843 p->crtc_hsync_end = p->hsync_end; f453ba04 Dave Airlie 2008-11-07 844 p->crtc_htotal = p->htotal; f453ba04 Dave Airlie 2008-11-07 845 p->crtc_hskew = p->hskew; f453ba04 Dave Airlie 2008-11-07 846 p->crtc_vdisplay = p->vdisplay; f453ba04 Dave Airlie 2008-11-07 847 p->crtc_vsync_start = p->vsync_start; f453ba04 Dave Airlie 2008-11-07 848 p->crtc_vsync_end = p->vsync_end; f453ba04 Dave Airlie 2008-11-07 849 p->crtc_vtotal = p->vtotal; f453ba04 Dave Airlie 2008-11-07 850 f453ba04 Dave Airlie 2008-11-07 851 if (p->flags & DRM_MODE_FLAG_INTERLACE) { f453ba04 Dave Airlie 2008-11-07 852 if (adjust_flags & CRTC_INTERLACE_HALVE_V) { f453ba04 Dave Airlie 2008-11-07 853 p->crtc_vdisplay /= 2; f453ba04 Dave Airlie 2008-11-07 854 p->crtc_vsync_start /= 2; f453ba04 Dave Airlie 2008-11-07 855 p->crtc_vsync_end /= 2; f453ba04 Dave Airlie 2008-11-07 856 p->crtc_vtotal /= 2; f453ba04 Dave Airlie 2008-11-07 857 } f453ba04 Dave Airlie 2008-11-07 858 } f453ba04 Dave Airlie 2008-11-07 859 ecb7e16b Gustavo Padovan 2014-12-01 860 if (!(adjust_flags & CRTC_NO_DBLSCAN)) { f453ba04 Dave Airlie 2008-11-07 861 if (p->flags & DRM_MODE_FLAG_DBLSCAN) { f453ba04 Dave Airlie 2008-11-07 862 p->crtc_vdisplay *= 2; f453ba04 Dave Airlie 2008-11-07 863 p->crtc_vsync_start *= 2; f453ba04 Dave Airlie 2008-11-07 864 p->crtc_vsync_end *= 2; f453ba04 Dave Airlie 2008-11-07 865 p->crtc_vtotal *= 2; f453ba04 Dave Airlie 2008-11-07 866 } ecb7e16b Gustavo Padovan 2014-12-01 867 } f453ba04 Dave Airlie 2008-11-07 868 ecb7e16b Gustavo Padovan 2014-12-01 869 if (!(adjust_flags & CRTC_NO_VSCAN)) { f453ba04 Dave Airlie 2008-11-07 870 if (p->vscan > 1) { f453ba04 Dave Airlie 2008-11-07 871 p->crtc_vdisplay *= p->vscan; f453ba04 Dave Airlie 2008-11-07 872 p->crtc_vsync_start *= p->vscan; f453ba04 Dave Airlie 2008-11-07 873 p->crtc_vsync_end *= p->vscan; f453ba04 Dave Airlie 2008-11-07 874 p->crtc_vtotal *= p->vscan; f453ba04 Dave Airlie 2008-11-07 875 } ecb7e16b Gustavo Padovan 2014-12-01 876 } f453ba04 Dave Airlie 2008-11-07 877 448cce25 Damien Lespiau 2013-09-25 878 if (adjust_flags & CRTC_STEREO_DOUBLE) { 448cce25 Damien Lespiau 2013-09-25 879 unsigned int layout = p->flags & DRM_MODE_FLAG_3D_MASK; 448cce25 Damien Lespiau 2013-09-25 880 448cce25 Damien Lespiau 2013-09-25 881 switch (layout) { 448cce25 Damien Lespiau 2013-09-25 882 case DRM_MODE_FLAG_3D_FRAME_PACKING: 448cce25 Damien Lespiau 2013-09-25 883 p->crtc_clock *= 2; 448cce25 Damien Lespiau 2013-09-25 884 p->crtc_vdisplay += p->crtc_vtotal; 448cce25 Damien Lespiau 2013-09-25 885 p->crtc_vsync_start += p->crtc_vtotal; 448cce25 Damien Lespiau 2013-09-25 886 p->crtc_vsync_end += p->crtc_vtotal; 448cce25 Damien Lespiau 2013-09-25 887 p->crtc_vtotal += p->crtc_vtotal; 448cce25 Damien Lespiau 2013-09-25 888 break; 448cce25 Damien Lespiau 2013-09-25 889 } 448cce25 Damien Lespiau 2013-09-25 890 } 448cce25 Damien Lespiau 2013-09-25 891 f453ba04 Dave Airlie 2008-11-07 892 p->crtc_vblank_start = min(p->crtc_vsync_start, p->crtc_vdisplay); f453ba04 Dave Airlie 2008-11-07 893 p->crtc_vblank_end = max(p->crtc_vsync_end, p->crtc_vtotal); f453ba04 Dave Airlie 2008-11-07 894 p->crtc_hblank_start = min(p->crtc_hsync_start, p->crtc_hdisplay); f453ba04 Dave Airlie 2008-11-07 895 p->crtc_hblank_end = max(p->crtc_hsync_end, p->crtc_htotal); f453ba04 Dave Airlie 2008-11-07 896 } f453ba04 Dave Airlie 2008-11-07 897 EXPORT_SYMBOL(drm_mode_set_crtcinfo); f453ba04 Dave Airlie 2008-11-07 898 f453ba04 Dave Airlie 2008-11-07 899 /** c3c50e8b Ville Syrjälä 2012-03-13 900 * drm_mode_copy - copy the mode c3c50e8b Ville Syrjälä 2012-03-13 901 * @dst: mode to overwrite c3c50e8b Ville Syrjälä 2012-03-13 902 * @src: mode to copy c3c50e8b Ville Syrjälä 2012-03-13 903 * 72e45e92 Ville Syrjälä 2013-05-31 904 * Copy an existing mode into another mode, preserving the object id and 72e45e92 Ville Syrjälä 2013-05-31 905 * list head of the destination mode. c3c50e8b Ville Syrjälä 2012-03-13 906 */ c3c50e8b Ville Syrjälä 2012-03-13 907 void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src) c3c50e8b Ville Syrjälä 2012-03-13 908 { c3c50e8b Ville Syrjälä 2012-03-13 @909 int id = dst->base.id; 72e45e92 Ville Syrjälä 2013-05-31 @910 struct list_head head = dst->head; c3c50e8b Ville Syrjälä 2012-03-13 911 c3c50e8b Ville Syrjälä 2012-03-13 912 *dst = *src; c3c50e8b Ville Syrjälä 2012-03-13 913 dst->base.id = id; :::::: The code at line 909 was first introduced by commit :::::: c3c50e8b651887bcefcc13beb3739c00b2379b5c drm: Add drm_mode_copy() :::::: TO: Ville Syrjälä <ville.syrj...@linux.intel.com> :::::: CC: Dave Airlie <airl...@redhat.com> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip
_______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel