Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'drm-fixes-for-v4.17-rc7' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
"Only two sets of drivers fixes: one rcar-du lvds regression fix, and a
group of fixes for vmwgfx"

* tag 'drm-fixes-for-v4.17-rc7' of git://people.freedesktop.org/~airlied/linux:
drm/vmwgfx: Schedule an fb dirty update after resume
drm/vmwgfx: Fix host logging / guestinfo reading error paths
drm/vmwgfx: Fix 32-bit VMW_PORT_HB_[IN|OUT] macros
drm: rcar-du: lvds: Fix crash in .atomic_check when disabling connector

+59 -47
+3
drivers/gpu/drm/rcar-du/rcar_lvds.c
··· 88 88 const struct drm_display_mode *panel_mode; 89 89 struct drm_crtc_state *crtc_state; 90 90 91 + if (!state->crtc) 92 + return 0; 93 + 91 94 if (list_empty(&connector->modes)) { 92 95 dev_dbg(lvds->dev, "connector: empty modes list\n"); 93 96 return -EINVAL;
-5
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
··· 1278 1278 dev_priv->active_master = &dev_priv->fbdev_master; 1279 1279 ttm_lock_set_kill(&dev_priv->fbdev_master.lock, false, SIGTERM); 1280 1280 ttm_vt_unlock(&dev_priv->fbdev_master.lock); 1281 - 1282 - vmw_fb_refresh(dev_priv); 1283 1281 } 1284 1282 1285 1283 /** ··· 1481 1483 vmw_kms_resume(dev); 1482 1484 if (dev_priv->enable_fb) 1483 1485 vmw_fb_on(dev_priv); 1484 - vmw_fb_refresh(dev_priv); 1485 1486 return -EBUSY; 1486 1487 } 1487 1488 ··· 1519 1522 1520 1523 if (dev_priv->enable_fb) 1521 1524 vmw_fb_on(dev_priv); 1522 - 1523 - vmw_fb_refresh(dev_priv); 1524 1525 1525 1526 return 0; 1526 1527 }
-1
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
··· 910 910 int vmw_fb_close(struct vmw_private *dev_priv); 911 911 int vmw_fb_off(struct vmw_private *vmw_priv); 912 912 int vmw_fb_on(struct vmw_private *vmw_priv); 913 - void vmw_fb_refresh(struct vmw_private *vmw_priv); 914 913 915 914 /** 916 915 * Kernel modesetting - vmwgfx_kms.c
+8 -16
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
··· 866 866 spin_lock_irqsave(&par->dirty.lock, flags); 867 867 par->dirty.active = true; 868 868 spin_unlock_irqrestore(&par->dirty.lock, flags); 869 - 869 + 870 + /* 871 + * Need to reschedule a dirty update, because otherwise that's 872 + * only done in dirty_mark() if the previous coalesced 873 + * dirty region was empty. 874 + */ 875 + schedule_delayed_work(&par->local_work, 0); 876 + 870 877 return 0; 871 - } 872 - 873 - /** 874 - * vmw_fb_refresh - Refresh fb display 875 - * 876 - * @vmw_priv: Pointer to device private 877 - * 878 - * Call into kms to show the fbdev display(s). 879 - */ 880 - void vmw_fb_refresh(struct vmw_private *vmw_priv) 881 - { 882 - if (!vmw_priv->fb_info) 883 - return; 884 - 885 - vmw_fb_set_par(vmw_priv->fb_info); 886 878 }
+31 -17
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
··· 329 329 struct rpc_channel channel; 330 330 char *msg, *reply = NULL; 331 331 size_t reply_len = 0; 332 - int ret = 0; 333 - 334 332 335 333 if (!vmw_msg_enabled) 336 334 return -ENODEV; ··· 342 344 return -ENOMEM; 343 345 } 344 346 345 - if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM) || 346 - vmw_send_msg(&channel, msg) || 347 - vmw_recv_msg(&channel, (void *) &reply, &reply_len) || 348 - vmw_close_channel(&channel)) { 349 - DRM_ERROR("Failed to get %s", guest_info_param); 347 + if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM)) 348 + goto out_open; 350 349 351 - ret = -EINVAL; 352 - } 350 + if (vmw_send_msg(&channel, msg) || 351 + vmw_recv_msg(&channel, (void *) &reply, &reply_len)) 352 + goto out_msg; 353 353 354 + vmw_close_channel(&channel); 354 355 if (buffer && reply && reply_len > 0) { 355 356 /* Remove reply code, which are the first 2 characters of 356 357 * the reply ··· 366 369 kfree(reply); 367 370 kfree(msg); 368 371 369 - return ret; 372 + return 0; 373 + 374 + out_msg: 375 + vmw_close_channel(&channel); 376 + kfree(reply); 377 + out_open: 378 + *length = 0; 379 + kfree(msg); 380 + DRM_ERROR("Failed to get %s", guest_info_param); 381 + 382 + return -EINVAL; 370 383 } 371 384 372 385 ··· 407 400 return -ENOMEM; 408 401 } 409 402 410 - if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM) || 411 - vmw_send_msg(&channel, msg) || 412 - vmw_close_channel(&channel)) { 413 - DRM_ERROR("Failed to send log\n"); 403 + if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM)) 404 + goto out_open; 414 405 415 - ret = -EINVAL; 416 - } 406 + if (vmw_send_msg(&channel, msg)) 407 + goto out_msg; 417 408 409 + vmw_close_channel(&channel); 418 410 kfree(msg); 419 411 420 - return ret; 412 + return 0; 413 + 414 + out_msg: 415 + vmw_close_channel(&channel); 416 + out_open: 417 + kfree(msg); 418 + DRM_ERROR("Failed to send log\n"); 419 + 420 + return -EINVAL; 421 421 }
+17 -8
drivers/gpu/drm/vmwgfx/vmwgfx_msg.h
··· 135 135 136 136 #else 137 137 138 - /* In the 32-bit version of this macro, we use "m" because there is no 139 - * more register left for bp 138 + /* 139 + * In the 32-bit version of this macro, we store bp in a memory location 140 + * because we've ran out of registers. 141 + * Now we can't reference that memory location while we've modified 142 + * %esp or %ebp, so we first push it on the stack, just before we push 143 + * %ebp, and then when we need it we read it from the stack where we 144 + * just pushed it. 140 145 */ 141 146 #define VMW_PORT_HB_OUT(cmd, in_ecx, in_si, in_di, \ 142 147 port_num, magic, bp, \ 143 148 eax, ebx, ecx, edx, si, di) \ 144 149 ({ \ 145 - asm volatile ("push %%ebp;" \ 146 - "mov %12, %%ebp;" \ 150 + asm volatile ("push %12;" \ 151 + "push %%ebp;" \ 152 + "mov 0x04(%%esp), %%ebp;" \ 147 153 "rep outsb;" \ 148 - "pop %%ebp;" : \ 154 + "pop %%ebp;" \ 155 + "add $0x04, %%esp;" : \ 149 156 "=a"(eax), \ 150 157 "=b"(ebx), \ 151 158 "=c"(ecx), \ ··· 174 167 port_num, magic, bp, \ 175 168 eax, ebx, ecx, edx, si, di) \ 176 169 ({ \ 177 - asm volatile ("push %%ebp;" \ 178 - "mov %12, %%ebp;" \ 170 + asm volatile ("push %12;" \ 171 + "push %%ebp;" \ 172 + "mov 0x04(%%esp), %%ebp;" \ 179 173 "rep insb;" \ 180 - "pop %%ebp" : \ 174 + "pop %%ebp;" \ 175 + "add $0x04, %%esp;" : \ 181 176 "=a"(eax), \ 182 177 "=b"(ebx), \ 183 178 "=c"(ecx), \