tree:   git://people.freedesktop.org/~robclark/linux cold-fusion-v3.16-rc5
head:   fb5df2058e47abf6ba75b32711d9d13e729811fc
commit: b045ab0229363a7516499c71af9c708d1347fd4e [22/25] drm: convert crtc to 
properties/state

>> drivers/gpu/drm/drm_crtc.c:2969:2-8: preceding lock on line 2913

git remote add robclark git://people.freedesktop.org/~robclark/linux
git remote update robclark
git checkout b045ab0229363a7516499c71af9c708d1347fd4e
vim +2969 drivers/gpu/drm/drm_crtc.c

4a1b07142 Laurent Pinchart 2012-05-17  2907     int ret;
f453ba046 Dave Airlie      2008-11-07  2908     int i;
f453ba046 Dave Airlie      2008-11-07  2909  
fb3b06c8a Dave Airlie      2011-02-08  2910     if 
(!drm_core_check_feature(dev, DRIVER_MODESET))
fb3b06c8a Dave Airlie      2011-02-08  2911             return -EINVAL;
fb3b06c8a Dave Airlie      2011-02-08  2912  
b045ab022 Rob Clark        2014-03-15 @2913     
mutex_lock(&dev->mode_config.mutex);
1d97e9154 Ville Syrjälä    2012-03-13  2914  
a2b34e226 Rob Clark        2013-10-05  2915     crtc = drm_crtc_find(dev, 
crtc_req->crtc_id);
a2b34e226 Rob Clark        2013-10-05  2916     if (!crtc) {
58367ed65 Zhao Yakui       2009-07-20  2917             DRM_DEBUG_KMS("Unknown 
CRTC ID %d\n", crtc_req->crtc_id);
f27657f2e Ville Syrjälä    2013-10-17  2918             ret = -ENOENT;
f453ba046 Dave Airlie      2008-11-07  2919             goto out;
f453ba046 Dave Airlie      2008-11-07  2920     }
9440106b4 Jerome Glisse    2010-07-15  2921     DRM_DEBUG_KMS("[CRTC:%d]\n", 
crtc->base.id);
f453ba046 Dave Airlie      2008-11-07  2922  
f453ba046 Dave Airlie      2008-11-07  2923     if (crtc_req->mode_valid) {
f453ba046 Dave Airlie      2008-11-07  2924             /* If we have a mode we 
need a framebuffer. */
f453ba046 Dave Airlie      2008-11-07  2925             /* If we pass -1, set 
the mode with the currently bound fb */
f453ba046 Dave Airlie      2008-11-07  2926             if (crtc_req->fb_id == 
-1) {
f4510a275 Matt Roper       2014-04-01  2927                     if 
(!crtc->primary->fb) {
6653cc8d3 Ville Syrjälä    2012-03-13  2928                             
DRM_DEBUG_KMS("CRTC doesn't have current FB\n");
6653cc8d3 Ville Syrjälä    2012-03-13  2929                             ret = 
-EINVAL;
6653cc8d3 Ville Syrjälä    2012-03-13  2930                             goto 
out;
f453ba046 Dave Airlie      2008-11-07  2931                     }
b045ab022 Rob Clark        2014-03-15  2932                     fb_id = 
crtc->primary->fb->base.id;
f453ba046 Dave Airlie      2008-11-07  2933             } else {
b045ab022 Rob Clark        2014-03-15  2934                     fb_id = 
crtc_req->fb_id;
ee34ab5b0 Ville Syrjälä    2012-03-13  2935             }
f453ba046 Dave Airlie      2008-11-07  2936     }
f453ba046 Dave Airlie      2008-11-07  2937  
f453ba046 Dave Airlie      2008-11-07  2938     if (crtc_req->count_connectors 
> 0) {
b045ab022 Rob Clark        2014-03-15  2939             uint32_t __user 
*set_connectors_ptr =
b045ab022 Rob Clark        2014-03-15  2940                             
(uint32_t __user *)(unsigned long)crtc_req->set_connectors_ptr;
f453ba046 Dave Airlie      2008-11-07  2941  
f453ba046 Dave Airlie      2008-11-07  2942             /* Avoid unbounded 
kernel memory allocation */
f453ba046 Dave Airlie      2008-11-07  2943             if 
(crtc_req->count_connectors > config->num_connector) {
f453ba046 Dave Airlie      2008-11-07  2944                     ret = -EINVAL;
f453ba046 Dave Airlie      2008-11-07  2945                     goto out;
f453ba046 Dave Airlie      2008-11-07  2946             }
f453ba046 Dave Airlie      2008-11-07  2947  
b045ab022 Rob Clark        2014-03-15  2948             connector_ids = 
kmalloc(crtc_req->count_connectors *
b045ab022 Rob Clark        2014-03-15  2949                                     
sizeof(connector_ids[0]),
f453ba046 Dave Airlie      2008-11-07  2950                                     
GFP_KERNEL);
b045ab022 Rob Clark        2014-03-15  2951             if (!connector_ids) {
f453ba046 Dave Airlie      2008-11-07  2952                     ret = -ENOMEM;
f453ba046 Dave Airlie      2008-11-07  2953                     goto out;
f453ba046 Dave Airlie      2008-11-07  2954             }
f453ba046 Dave Airlie      2008-11-07  2955  
f453ba046 Dave Airlie      2008-11-07  2956             for (i = 0; i < 
crtc_req->count_connectors; i++) {
b045ab022 Rob Clark        2014-03-15  2957                     u32 out_id;
b045ab022 Rob Clark        2014-03-15  2958  
f453ba046 Dave Airlie      2008-11-07  2959                     if 
(get_user(out_id, &set_connectors_ptr[i])) {
f453ba046 Dave Airlie      2008-11-07  2960                             ret = 
-EFAULT;
f453ba046 Dave Airlie      2008-11-07  2961                             goto 
out;
f453ba046 Dave Airlie      2008-11-07  2962                     }
b045ab022 Rob Clark        2014-03-15  2963                     
connector_ids[i] = out_id;
f453ba046 Dave Airlie      2008-11-07  2964             }
f453ba046 Dave Airlie      2008-11-07  2965     }
f453ba046 Dave Airlie      2008-11-07  2966  
b045ab022 Rob Clark        2014-03-15  2967     state = 
dev->driver->atomic_begin(dev, 0);
b045ab022 Rob Clark        2014-03-15  2968     if (IS_ERR(state))
b045ab022 Rob Clark        2014-03-15 @2969             return PTR_ERR(state);
f453ba046 Dave Airlie      2008-11-07  2970  
b045ab022 Rob Clark        2014-03-15  2971  retry:
b045ab022 Rob Clark        2014-03-15  2972     ret = 
drm_modeset_lock(&config->connection_mutex, &state->acquire_ctx);

---
0-DAY kernel build testing backend              Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation
_______________________________________________
kbuild mailing list
[email protected]
https://lists.01.org/mailman/listinfo/kbuild
_______________________________________________
kbuild mailing list
[email protected]
https://lists.01.org/mailman/listinfo/kbuild

Reply via email to