Re: [Nouveau] [PATCH v2 5/9] drm/nouveau: Use drm_connector_for_each_possible_encoder()

2018-06-30 Thread Dan Carpenter
Hi Ville,

Thank you for the patch! Perhaps something to improve:

url:
https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-Third-attempt-at-fixing-the-fb-helper-best_encoder-mess/20180629-014202
base:   git://people.freedesktop.org/~airlied/linux.git drm-next

smatch warnings:
drivers/gpu/drm/nouveau/nouveau_connector.c:461 nouveau_connector_ddc_detect() 
error: uninitialized symbol 'nv_encoder'.

# 
https://github.com/0day-ci/linux/commit/7ec8bb65386edfb0b2bdc8e8391eb5e6eac44c06
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 7ec8bb65386edfb0b2bdc8e8391eb5e6eac44c06
vim +/nv_encoder +461 drivers/gpu/drm/nouveau/nouveau_connector.c

6ee738610 Ben Skeggs  2009-12-11  407  
8777c5c11 Ben Skeggs  2014-06-06  408  static struct nouveau_encoder *
8777c5c11 Ben Skeggs  2014-06-06  409  nouveau_connector_ddc_detect(struct 
drm_connector *connector)
6ee738610 Ben Skeggs  2009-12-11  410  {
6ee738610 Ben Skeggs  2009-12-11  411   struct drm_device *dev = 
connector->dev;
1a1841d30 Ben Skeggs  2012-12-10  412   struct nouveau_connector 
*nv_connector = nouveau_connector(connector);
77145f1cb Ben Skeggs  2012-07-31  413   struct nouveau_drm *drm = 
nouveau_drm(dev);
1167c6bc5 Ben Skeggs  2016-05-18  414   struct nvkm_gpio *gpio = 
nvxx_gpio(>client.device);
8777c5c11 Ben Skeggs  2014-06-06  415   struct nouveau_encoder 
*nv_encoder;
6d385c0aa Rob Clark   2014-07-17  416   struct drm_encoder *encoder;
1a1841d30 Ben Skeggs  2012-12-10  417   int i, panel = -ENODEV;
1a1841d30 Ben Skeggs  2012-12-10  418  
1a1841d30 Ben Skeggs  2012-12-10  419   /* eDP panels need powering on 
by us (if the VBIOS doesn't default it
1a1841d30 Ben Skeggs  2012-12-10  420* to on) before doing any AUX 
channel transactions.  LVDS panel power
1a1841d30 Ben Skeggs  2012-12-10  421* is handled by the SOR 
itself, and not required for LVDS DDC.
1a1841d30 Ben Skeggs  2012-12-10  422*/
1a1841d30 Ben Skeggs  2012-12-10  423   if (nv_connector->type == 
DCB_CONNECTOR_eDP) {
2ea7249fe Ben Skeggs  2015-08-20  424   panel = 
nvkm_gpio_get(gpio, 0, DCB_GPIO_PANEL_POWER, 0xff);
1a1841d30 Ben Skeggs  2012-12-10  425   if (panel == 0) {
2ea7249fe Ben Skeggs  2015-08-20  426   
nvkm_gpio_set(gpio, 0, DCB_GPIO_PANEL_POWER, 0xff, 1);
1a1841d30 Ben Skeggs  2012-12-10  427   msleep(300);
1a1841d30 Ben Skeggs  2012-12-10  428   }
1a1841d30 Ben Skeggs  2012-12-10  429   }
6ee738610 Ben Skeggs  2009-12-11  430  
7ec8bb653 Ville Syrjälä   2018-06-28  431   
drm_connector_for_each_possible_encoder(connector, encoder, i) {
6d385c0aa Rob Clark   2014-07-17  432   nv_encoder = 
nouveau_encoder(encoder);

^
If we enter the loop that means nv_encoder is non-NULL.  Smatch can't
prove that we always enter the loop in this case for whatever reason but
my guess is that we always do.

4ca2b7120 Francisco Jerez 2010-08-08  433  
8777c5c11 Ben Skeggs  2014-06-06  434   if 
(nv_encoder->dcb->type == DCB_OUTPUT_DP) {
8777c5c11 Ben Skeggs  2014-06-06  435   int ret = 
nouveau_dp_detect(nv_encoder);
52aa30f25 Ben Skeggs  2016-11-04  436   if (ret == 
NOUVEAU_DP_MST)
52aa30f25 Ben Skeggs  2016-11-04  437   return 
NULL;
52aa30f25 Ben Skeggs  2016-11-04  438   if (ret == 
NOUVEAU_DP_SST)
8777c5c11 Ben Skeggs  2014-06-06  439   break;
8777c5c11 Ben Skeggs  2014-06-06  440   } else
39c1c9011 Lukas Wunner2016-01-11  441   if 
((vga_switcheroo_handler_flags() &
39c1c9011 Lukas Wunner2016-01-11  442
VGA_SWITCHEROO_CAN_SWITCH_DDC) &&
39c1c9011 Lukas Wunner2016-01-11  443   
nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
39c1c9011 Lukas Wunner2016-01-11  444   nv_encoder->i2c) {
39c1c9011 Lukas Wunner2016-01-11  445   int ret;
39c1c9011 Lukas Wunner2016-01-11  446   
vga_switcheroo_lock_ddc(dev->pdev);
39c1c9011 Lukas Wunner2016-01-11  447   ret = 
nvkm_probe_i2c(nv_encoder->i2c, 0x50);
39c1c9011 Lukas Wunner2016-01-11  448   
vga_switcheroo_unlock_ddc(dev->pdev);
39c1c9011 Lukas Wunner2016-01-11  449   if (ret)
39c1c9011 Lukas Wunner2016-01-11  450   break;
39c1c9011 Lukas Wunner2016-01-11  451   } else
8777c5c11 Ben Skeggs  2014-06-06  452   if (nv_encoder->i2c) {
2aa5eac51 Ben Skeggs  2015-08-20  453   if 

[Nouveau] [Bug 84741] [NV46] nouveau can't find VBIOS

2018-06-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84741

Germano Massullo  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Germano Massullo  ---
I have no longer access to the affected machine, nor I had any feedback from
component developers.
I close the bugreport as wontfix

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 92192] nouveau does not detect monitor native resolution (Geforce GT240 / GT215)

2018-06-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92192

Germano Massullo  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|NEW |RESOLVED

--- Comment #6 from Germano Massullo  ---
I have no longer access to the affected machine, nor I had any feedback from
component developers.
I close the bugreport as wontfix

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau