Hi Dominik,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.15]
[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/dbehr-chromium-org/drm-amdgpu-display-fix-wrong-enum-type-for-ddc_result/20180204-091310
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c: In function 
'dc_link_handle_hpd_rx_irq':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:1949:13: warning: 
>> comparison between 'enum ddc_result' and 'enum dc_status' [-Wenum-compare]
     if (result != DC_OK) {
                ^~

vim +1949 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c

4562236b3b Harry Wentland 2017-09-12  1924  
d0778ebfd5 Harry Wentland 2017-07-22  1925  bool 
dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data 
*out_hpd_irq_dpcd_data)
4562236b3b Harry Wentland 2017-09-12  1926  {
4562236b3b Harry Wentland 2017-09-12  1927      union hpd_irq_data 
hpd_irq_dpcd_data = {{{{0}}}};
c2e218dda0 Harry Wentland 2017-02-24  1928      union device_service_irq 
device_service_clear = { { 0 } };
698569c574 Dominik Behr   2018-02-01  1929      enum ddc_result result = 
DDC_RESULT_UNKNOWN;
4562236b3b Harry Wentland 2017-09-12  1930      bool status = false;
4562236b3b Harry Wentland 2017-09-12  1931      /* For use cases related to 
down stream connection status change,
4562236b3b Harry Wentland 2017-09-12  1932       * PSR and device auto test, 
refer to function handle_sst_hpd_irq
4562236b3b Harry Wentland 2017-09-12  1933       * in DAL2.1*/
4562236b3b Harry Wentland 2017-09-12  1934  
4562236b3b Harry Wentland 2017-09-12  1935      
dm_logger_write(link->ctx->logger, LOG_HW_HPD_IRQ,
4562236b3b Harry Wentland 2017-09-12  1936              "%s: Got short pulse 
HPD on link %d\n",
d0778ebfd5 Harry Wentland 2017-07-22  1937              __func__, 
link->link_index);
4562236b3b Harry Wentland 2017-09-12  1938  
8ee65d7c93 Wenjing Liu    2017-07-19  1939  
4562236b3b Harry Wentland 2017-09-12  1940       /* All the 
"handle_hpd_irq_xxx()" methods
4562236b3b Harry Wentland 2017-09-12  1941               * should be called 
only after
4562236b3b Harry Wentland 2017-09-12  1942               * 
dal_dpsst_ls_read_hpd_irq_data
4562236b3b Harry Wentland 2017-09-12  1943               * Order of calls is 
important too
4562236b3b Harry Wentland 2017-09-12  1944               */
4562236b3b Harry Wentland 2017-09-12  1945      result = 
read_hpd_rx_irq_data(link, &hpd_irq_dpcd_data);
8ee65d7c93 Wenjing Liu    2017-07-19  1946      if (out_hpd_irq_dpcd_data)
8ee65d7c93 Wenjing Liu    2017-07-19  1947              *out_hpd_irq_dpcd_data 
= hpd_irq_dpcd_data;
4562236b3b Harry Wentland 2017-09-12  1948  
4562236b3b Harry Wentland 2017-09-12 @1949      if (result != DC_OK) {
4562236b3b Harry Wentland 2017-09-12  1950              
dm_logger_write(link->ctx->logger, LOG_HW_HPD_IRQ,
4562236b3b Harry Wentland 2017-09-12  1951                      "%s: DPCD read 
failed to obtain irq data\n",
4562236b3b Harry Wentland 2017-09-12  1952                      __func__);
4562236b3b Harry Wentland 2017-09-12  1953              return false;
4562236b3b Harry Wentland 2017-09-12  1954      }
4562236b3b Harry Wentland 2017-09-12  1955  
4562236b3b Harry Wentland 2017-09-12  1956      if 
(hpd_irq_dpcd_data.bytes.device_service_irq.bits.AUTOMATED_TEST) {
4562236b3b Harry Wentland 2017-09-12  1957              
device_service_clear.bits.AUTOMATED_TEST = 1;
4562236b3b Harry Wentland 2017-09-12  1958              core_link_write_dpcd(
4562236b3b Harry Wentland 2017-09-12  1959                      link,
3a340294f7 Dave Airlie    2016-12-13  1960                      
DP_DEVICE_SERVICE_IRQ_VECTOR,
4562236b3b Harry Wentland 2017-09-12  1961                      
&device_service_clear.raw,
4562236b3b Harry Wentland 2017-09-12  1962                      
sizeof(device_service_clear.raw));
4562236b3b Harry Wentland 2017-09-12  1963              
device_service_clear.raw = 0;
4562236b3b Harry Wentland 2017-09-12  1964              
handle_automated_test(link);
4562236b3b Harry Wentland 2017-09-12  1965              return false;
4562236b3b Harry Wentland 2017-09-12  1966      }
4562236b3b Harry Wentland 2017-09-12  1967  
4562236b3b Harry Wentland 2017-09-12  1968      if (!allow_hpd_rx_irq(link)) {
4562236b3b Harry Wentland 2017-09-12  1969              
dm_logger_write(link->ctx->logger, LOG_HW_HPD_IRQ,
4562236b3b Harry Wentland 2017-09-12  1970                      "%s: skipping 
HPD handling on %d\n",
d0778ebfd5 Harry Wentland 2017-07-22  1971                      __func__, 
link->link_index);
4562236b3b Harry Wentland 2017-09-12  1972              return false;
4562236b3b Harry Wentland 2017-09-12  1973      }
4562236b3b Harry Wentland 2017-09-12  1974  
4562236b3b Harry Wentland 2017-09-12  1975      if 
(handle_hpd_irq_psr_sink(link))
4562236b3b Harry Wentland 2017-09-12  1976              /* PSR-related error 
was detected and handled */
4562236b3b Harry Wentland 2017-09-12  1977              return true;
4562236b3b Harry Wentland 2017-09-12  1978  
4562236b3b Harry Wentland 2017-09-12  1979      /* If PSR-related error 
handled, Main link may be off,
4562236b3b Harry Wentland 2017-09-12  1980       * so do not handle as a normal 
sink status change interrupt.
4562236b3b Harry Wentland 2017-09-12  1981       */
4562236b3b Harry Wentland 2017-09-12  1982  
aaa15026f2 Wenjing Liu    2017-08-22  1983      if 
(hpd_irq_dpcd_data.bytes.device_service_irq.bits.UP_REQ_MSG_RDY)
aaa15026f2 Wenjing Liu    2017-08-22  1984              return true;
aaa15026f2 Wenjing Liu    2017-08-22  1985  
4562236b3b Harry Wentland 2017-09-12  1986      /* check if we have MST msg and 
return since we poll for it */
aaa15026f2 Wenjing Liu    2017-08-22  1987      if 
(hpd_irq_dpcd_data.bytes.device_service_irq.bits.DOWN_REP_MSG_RDY)
4562236b3b Harry Wentland 2017-09-12  1988              return false;
4562236b3b Harry Wentland 2017-09-12  1989  
4562236b3b Harry Wentland 2017-09-12  1990      /* For now we only handle 
'Downstream port status' case.
4562236b3b Harry Wentland 2017-09-12  1991       * If we got sink count changed 
it means
4562236b3b Harry Wentland 2017-09-12  1992       * Downstream port status 
changed,
4562236b3b Harry Wentland 2017-09-12  1993       * then DM should call DC to do 
the detection. */
4562236b3b Harry Wentland 2017-09-12  1994      if 
(hpd_rx_irq_check_link_loss_status(
4562236b3b Harry Wentland 2017-09-12  1995              link,
4562236b3b Harry Wentland 2017-09-12  1996              &hpd_irq_dpcd_data)) {
4562236b3b Harry Wentland 2017-09-12  1997              /* Connectivity log: 
link loss */
4562236b3b Harry Wentland 2017-09-12  1998              
CONN_DATA_LINK_LOSS(link,
4562236b3b Harry Wentland 2017-09-12  1999                                      
hpd_irq_dpcd_data.raw,
4562236b3b Harry Wentland 2017-09-12  2000                                      
sizeof(hpd_irq_dpcd_data),
4562236b3b Harry Wentland 2017-09-12  2001                                      
"Status: ");
4562236b3b Harry Wentland 2017-09-12  2002  
4562236b3b Harry Wentland 2017-09-12  2003              
perform_link_training_with_retries(link,
d0778ebfd5 Harry Wentland 2017-07-22  2004                      
&link->cur_link_settings,
4562236b3b Harry Wentland 2017-09-12  2005                      true, 
LINK_TRAINING_ATTEMPTS);
4562236b3b Harry Wentland 2017-09-12  2006  
4562236b3b Harry Wentland 2017-09-12  2007              status = false;
4562236b3b Harry Wentland 2017-09-12  2008      }
4562236b3b Harry Wentland 2017-09-12  2009  
d0778ebfd5 Harry Wentland 2017-07-22  2010      if (link->type == 
dc_connection_active_dongle &&
4562236b3b Harry Wentland 2017-09-12  2011              
hpd_irq_dpcd_data.bytes.sink_cnt.bits.SINK_COUNT
4562236b3b Harry Wentland 2017-09-12  2012                      != 
link->dpcd_sink_count)
4562236b3b Harry Wentland 2017-09-12  2013              status = true;
4562236b3b Harry Wentland 2017-09-12  2014  
4562236b3b Harry Wentland 2017-09-12  2015      /* reasons for HPD RX:
4562236b3b Harry Wentland 2017-09-12  2016       * 1. Link Loss - ie Re-train 
the Link
4562236b3b Harry Wentland 2017-09-12  2017       * 2. MST sideband message
4562236b3b Harry Wentland 2017-09-12  2018       * 3. Automated Test - ie. 
Internal Commit
4562236b3b Harry Wentland 2017-09-12  2019       * 4. CP (copy protection) - 
(not interesting for DM???)
4562236b3b Harry Wentland 2017-09-12  2020       * 5. DRR
4562236b3b Harry Wentland 2017-09-12  2021       * 6. Downstream Port status 
changed
4562236b3b Harry Wentland 2017-09-12  2022       * -ie. Detect - this the only 
one
4562236b3b Harry Wentland 2017-09-12  2023       * which is interesting for DM 
because
4562236b3b Harry Wentland 2017-09-12  2024       * it must call dc_link_detect.
4562236b3b Harry Wentland 2017-09-12  2025       */
4562236b3b Harry Wentland 2017-09-12  2026      return status;
4562236b3b Harry Wentland 2017-09-12  2027  }
4562236b3b Harry Wentland 2017-09-12  2028  

:::::: The code at line 1949 was first introduced by commit
:::::: 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c drm/amd/dc: Add dc display 
driver (v2)

:::::: TO: Harry Wentland <harry.wentl...@amd.com>
:::::: CC: Alex Deucher <alexander.deuc...@amd.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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