tree:   git://anongit.freedesktop.org/drm-intel topic/dp-hdmi-2.1-pcon
head:   522508b665df3bbfdf40381d4e61777844b1703f
commit: 522508b665df3bbfdf40381d4e61777844b1703f [15/15] drm/i915/display: Let 
PCON convert from RGB to YCbCr if it can
config: x86_64-randconfig-r011-20210108 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
5c951623bc8965fa1e89660f2f5f4a2944e4981a)
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git remote add drm-intel git://anongit.freedesktop.org/drm-intel
        git fetch --no-tags drm-intel topic/dp-hdmi-2.1-pcon
        git checkout 522508b665df3bbfdf40381d4e61777844b1703f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_dp.c:6909:42: error: use of logical '||' 
>> with constant operand [-Werror,-Wconstant-logical-operand]
                                                                    
DP_DS_HDMI_BT601_RGB_YCBCR_CONV ||
                                                                                
                    ^
   drivers/gpu/drm/i915/display/intel_dp.c:6909:42: note: use '|' for a bitwise 
operation
                                                                    
DP_DS_HDMI_BT601_RGB_YCBCR_CONV ||
                                                                                
                    ^~
                                                                                
                    |
   drivers/gpu/drm/i915/display/intel_dp.c:6910:42: error: use of logical '||' 
with constant operand [-Werror,-Wconstant-logical-operand]
                                                                    
DP_DS_HDMI_BT709_RGB_YCBCR_CONV ||
                                                                                
                    ^
   drivers/gpu/drm/i915/display/intel_dp.c:6910:42: note: use '|' for a bitwise 
operation
                                                                    
DP_DS_HDMI_BT709_RGB_YCBCR_CONV ||
                                                                                
                    ^~
                                                                                
                    |
>> drivers/gpu/drm/i915/display/intel_dp.c:6911:10: error: converting the 
>> result of '<<' to a boolean always evaluates to true 
>> [-Werror,-Wtautological-constant-compare]
                                                                    
DP_DS_HDMI_BT2020_RGB_YCBCR_CONV);
                                                                    ^
   include/drm/drm_dp_helper.h:444:48: note: expanded from macro 
'DP_DS_HDMI_BT2020_RGB_YCBCR_CONV'
   # define DP_DS_HDMI_BT2020_RGB_YCBCR_CONV   (1 << 7)
                                                  ^
   drivers/gpu/drm/i915/display/intel_dp.c:6909:10: error: converting the 
result of '<<' to a boolean always evaluates to true 
[-Werror,-Wtautological-constant-compare]
                                                                    
DP_DS_HDMI_BT601_RGB_YCBCR_CONV ||
                                                                    ^
   include/drm/drm_dp_helper.h:442:48: note: expanded from macro 
'DP_DS_HDMI_BT601_RGB_YCBCR_CONV'
   # define DP_DS_HDMI_BT601_RGB_YCBCR_CONV    (1 << 5)
                                                  ^
   drivers/gpu/drm/i915/display/intel_dp.c:6910:10: error: converting the 
result of '<<' to a boolean always evaluates to true 
[-Werror,-Wtautological-constant-compare]
                                                                    
DP_DS_HDMI_BT709_RGB_YCBCR_CONV ||
                                                                    ^
   include/drm/drm_dp_helper.h:443:48: note: expanded from macro 
'DP_DS_HDMI_BT709_RGB_YCBCR_CONV'
   # define DP_DS_HDMI_BT709_RGB_YCBCR_CONV    (1 << 6)
                                                  ^
   5 errors generated.


vim +6909 drivers/gpu/drm/i915/display/intel_dp.c

  6879  
  6880  static void
  6881  intel_dp_update_420(struct intel_dp *intel_dp)
  6882  {
  6883          struct drm_i915_private *i915 = dp_to_i915(intel_dp);
  6884          struct intel_connector *connector = 
intel_dp->attached_connector;
  6885          bool is_branch, ycbcr_420_passthrough, ycbcr_444_to_420, 
rgb_to_ycbcr;
  6886  
  6887          /* No YCbCr output support on gmch platforms */
  6888          if (HAS_GMCH(i915))
  6889                  return;
  6890  
  6891          /*
  6892           * ILK doesn't seem capable of DP YCbCr output. The
  6893           * displayed image is severly corrupted. SNB+ is fine.
  6894           */
  6895          if (IS_GEN(i915, 5))
  6896                  return;
  6897  
  6898          is_branch = drm_dp_is_branch(intel_dp->dpcd);
  6899          ycbcr_420_passthrough =
  6900                  drm_dp_downstream_420_passthrough(intel_dp->dpcd,
  6901                                                    
intel_dp->downstream_ports);
  6902          /* on-board LSPCON always assumed to support 4:4:4->4:2:0 
conversion */
  6903          ycbcr_444_to_420 =
  6904                  dp_to_dig_port(intel_dp)->lspcon.active ||
  6905                  drm_dp_downstream_444_to_420_conversion(intel_dp->dpcd,
  6906                                                          
intel_dp->downstream_ports);
  6907          rgb_to_ycbcr = 
drm_dp_downstream_rgb_to_ycbcr_conversion(intel_dp->dpcd,
  6908                                                                   
intel_dp->downstream_ports,
> 6909                                                                   
> DP_DS_HDMI_BT601_RGB_YCBCR_CONV ||
  6910                                                                   
DP_DS_HDMI_BT709_RGB_YCBCR_CONV ||
> 6911                                                                   
> DP_DS_HDMI_BT2020_RGB_YCBCR_CONV);
  6912  
  6913          if (INTEL_GEN(i915) >= 11) {
  6914                  /* Let PCON convert from RGB->YCbCr if possible */
  6915                  if (is_branch && rgb_to_ycbcr && ycbcr_444_to_420) {
  6916                          intel_dp->dfp.rgb_to_ycbcr = true;
  6917                          intel_dp->dfp.ycbcr_444_to_420 = true;
  6918                          connector->base.ycbcr_420_allowed = true;
  6919                  } else {
  6920                  /* Prefer 4:2:0 passthrough over 4:4:4->4:2:0 
conversion */
  6921                          intel_dp->dfp.ycbcr_444_to_420 =
  6922                                  ycbcr_444_to_420 && 
!ycbcr_420_passthrough;
  6923  
  6924                          connector->base.ycbcr_420_allowed =
  6925                                  !is_branch || ycbcr_444_to_420 || 
ycbcr_420_passthrough;
  6926                  }
  6927          } else {
  6928                  /* 4:4:4->4:2:0 conversion is the only way */
  6929                  intel_dp->dfp.ycbcr_444_to_420 = ycbcr_444_to_420;
  6930  
  6931                  connector->base.ycbcr_420_allowed = ycbcr_444_to_420;
  6932          }
  6933  
  6934          drm_dbg_kms(&i915->drm,
  6935                      "[CONNECTOR:%d:%s] RGB->YcbCr conversion? %s, YCbCr 
4:2:0 allowed? %s, YCbCr 4:4:4->4:2:0 conversion? %s\n",
  6936                      connector->base.base.id, connector->base.name,
  6937                      yesno(intel_dp->dfp.rgb_to_ycbcr),
  6938                      yesno(connector->base.ycbcr_420_allowed),
  6939                      yesno(intel_dp->dfp.ycbcr_444_to_420));
  6940  }
  6941  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to