vmwgfx, rcar-du fixes
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJbB6JmAAoJEAx081l5xIa+Ut8P/247Q0a0ohiLIuwrIt5ESfjr EDG/khUQi8QuoDBtEh061SpgaB5rCgRU1rUVan24pij8j50EnMl0Nltn2yNTNnKG SvMl9JfvpVJxXeCXdP0/71JHOCVYwkTUYa2asEZD5OGPbUxUf2S1caBxt9Z4lsyG gnVpa2UhwHXdwQAgxksDCHwfyLEPCexpl2s4ghRc1xD9paiNPBriE2vEMnXYCwQg gNDowaZLC190k51MwhK0OrUIQDH7h7pTmd460CTRZt4dwbmODEdsQLwFHIWrRX7U +rXb9S/Yuz5cAWDoPlWrnUnrqpls1Cz6E8GBdw3mskkEgLW6ZiYDj1hysoB3ASzQ OJvGkhxkFr/wdCD4si/rpSDY6hFGpVe9WOHg3v4e1whcMRx3DxHcWCivS3o/wws/ ZqZZAzPhCO7WEIDEZN4EGj4jI23qxchUr1RWJyuiV6AzaTksElsXYDsljY3OBXzD VX20kL/b+VuUf8ZmF/GPfY0OuzQvg0Iojim5SHqQC0JH0BgRUNagjQKZq+DCMVYK vR17JLjFYnrY5AE8bpZBmp/eYriWc5sftoiTsCs+v2R6caSN/0DxekrBuJruc2Nq URFdo2hwfsT5PKSB7lWxQ8Uhnr7iGAfbqSeZI53SG09r2Y2iCsmQd517GfqbbrMW OlMYKFXzMkSg/Vh20mW5 =YUH9 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
b9f57019a9
|
@ -88,6 +88,9 @@ static int rcar_lvds_connector_atomic_check(struct drm_connector *connector,
|
||||||
const struct drm_display_mode *panel_mode;
|
const struct drm_display_mode *panel_mode;
|
||||||
struct drm_crtc_state *crtc_state;
|
struct drm_crtc_state *crtc_state;
|
||||||
|
|
||||||
|
if (!state->crtc)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (list_empty(&connector->modes)) {
|
if (list_empty(&connector->modes)) {
|
||||||
dev_dbg(lvds->dev, "connector: empty modes list\n");
|
dev_dbg(lvds->dev, "connector: empty modes list\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -1278,8 +1278,6 @@ static void vmw_master_drop(struct drm_device *dev,
|
||||||
dev_priv->active_master = &dev_priv->fbdev_master;
|
dev_priv->active_master = &dev_priv->fbdev_master;
|
||||||
ttm_lock_set_kill(&dev_priv->fbdev_master.lock, false, SIGTERM);
|
ttm_lock_set_kill(&dev_priv->fbdev_master.lock, false, SIGTERM);
|
||||||
ttm_vt_unlock(&dev_priv->fbdev_master.lock);
|
ttm_vt_unlock(&dev_priv->fbdev_master.lock);
|
||||||
|
|
||||||
vmw_fb_refresh(dev_priv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1483,7 +1481,6 @@ static int vmw_pm_freeze(struct device *kdev)
|
||||||
vmw_kms_resume(dev);
|
vmw_kms_resume(dev);
|
||||||
if (dev_priv->enable_fb)
|
if (dev_priv->enable_fb)
|
||||||
vmw_fb_on(dev_priv);
|
vmw_fb_on(dev_priv);
|
||||||
vmw_fb_refresh(dev_priv);
|
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1523,8 +1520,6 @@ static int vmw_pm_restore(struct device *kdev)
|
||||||
if (dev_priv->enable_fb)
|
if (dev_priv->enable_fb)
|
||||||
vmw_fb_on(dev_priv);
|
vmw_fb_on(dev_priv);
|
||||||
|
|
||||||
vmw_fb_refresh(dev_priv);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -910,7 +910,6 @@ int vmw_fb_init(struct vmw_private *vmw_priv);
|
||||||
int vmw_fb_close(struct vmw_private *dev_priv);
|
int vmw_fb_close(struct vmw_private *dev_priv);
|
||||||
int vmw_fb_off(struct vmw_private *vmw_priv);
|
int vmw_fb_off(struct vmw_private *vmw_priv);
|
||||||
int vmw_fb_on(struct vmw_private *vmw_priv);
|
int vmw_fb_on(struct vmw_private *vmw_priv);
|
||||||
void vmw_fb_refresh(struct vmw_private *vmw_priv);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kernel modesetting - vmwgfx_kms.c
|
* Kernel modesetting - vmwgfx_kms.c
|
||||||
|
|
|
@ -867,20 +867,12 @@ int vmw_fb_on(struct vmw_private *vmw_priv)
|
||||||
par->dirty.active = true;
|
par->dirty.active = true;
|
||||||
spin_unlock_irqrestore(&par->dirty.lock, flags);
|
spin_unlock_irqrestore(&par->dirty.lock, flags);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Need to reschedule a dirty update, because otherwise that's
|
||||||
|
* only done in dirty_mark() if the previous coalesced
|
||||||
|
* dirty region was empty.
|
||||||
|
*/
|
||||||
|
schedule_delayed_work(&par->local_work, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* vmw_fb_refresh - Refresh fb display
|
|
||||||
*
|
|
||||||
* @vmw_priv: Pointer to device private
|
|
||||||
*
|
|
||||||
* Call into kms to show the fbdev display(s).
|
|
||||||
*/
|
|
||||||
void vmw_fb_refresh(struct vmw_private *vmw_priv)
|
|
||||||
{
|
|
||||||
if (!vmw_priv->fb_info)
|
|
||||||
return;
|
|
||||||
|
|
||||||
vmw_fb_set_par(vmw_priv->fb_info);
|
|
||||||
}
|
|
||||||
|
|
|
@ -329,8 +329,6 @@ int vmw_host_get_guestinfo(const char *guest_info_param,
|
||||||
struct rpc_channel channel;
|
struct rpc_channel channel;
|
||||||
char *msg, *reply = NULL;
|
char *msg, *reply = NULL;
|
||||||
size_t reply_len = 0;
|
size_t reply_len = 0;
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (!vmw_msg_enabled)
|
if (!vmw_msg_enabled)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -344,15 +342,14 @@ int vmw_host_get_guestinfo(const char *guest_info_param,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM) ||
|
if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM))
|
||||||
vmw_send_msg(&channel, msg) ||
|
goto out_open;
|
||||||
vmw_recv_msg(&channel, (void *) &reply, &reply_len) ||
|
|
||||||
vmw_close_channel(&channel)) {
|
|
||||||
DRM_ERROR("Failed to get %s", guest_info_param);
|
|
||||||
|
|
||||||
ret = -EINVAL;
|
if (vmw_send_msg(&channel, msg) ||
|
||||||
}
|
vmw_recv_msg(&channel, (void *) &reply, &reply_len))
|
||||||
|
goto out_msg;
|
||||||
|
|
||||||
|
vmw_close_channel(&channel);
|
||||||
if (buffer && reply && reply_len > 0) {
|
if (buffer && reply && reply_len > 0) {
|
||||||
/* Remove reply code, which are the first 2 characters of
|
/* Remove reply code, which are the first 2 characters of
|
||||||
* the reply
|
* the reply
|
||||||
|
@ -369,7 +366,17 @@ int vmw_host_get_guestinfo(const char *guest_info_param,
|
||||||
kfree(reply);
|
kfree(reply);
|
||||||
kfree(msg);
|
kfree(msg);
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
|
|
||||||
|
out_msg:
|
||||||
|
vmw_close_channel(&channel);
|
||||||
|
kfree(reply);
|
||||||
|
out_open:
|
||||||
|
*length = 0;
|
||||||
|
kfree(msg);
|
||||||
|
DRM_ERROR("Failed to get %s", guest_info_param);
|
||||||
|
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -400,15 +407,22 @@ int vmw_host_log(const char *log)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM) ||
|
if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM))
|
||||||
vmw_send_msg(&channel, msg) ||
|
goto out_open;
|
||||||
vmw_close_channel(&channel)) {
|
|
||||||
DRM_ERROR("Failed to send log\n");
|
|
||||||
|
|
||||||
ret = -EINVAL;
|
if (vmw_send_msg(&channel, msg))
|
||||||
}
|
goto out_msg;
|
||||||
|
|
||||||
|
vmw_close_channel(&channel);
|
||||||
kfree(msg);
|
kfree(msg);
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
|
|
||||||
|
out_msg:
|
||||||
|
vmw_close_channel(&channel);
|
||||||
|
out_open:
|
||||||
|
kfree(msg);
|
||||||
|
DRM_ERROR("Failed to send log\n");
|
||||||
|
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,17 +135,24 @@
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* In the 32-bit version of this macro, we use "m" because there is no
|
/*
|
||||||
* more register left for bp
|
* In the 32-bit version of this macro, we store bp in a memory location
|
||||||
|
* because we've ran out of registers.
|
||||||
|
* Now we can't reference that memory location while we've modified
|
||||||
|
* %esp or %ebp, so we first push it on the stack, just before we push
|
||||||
|
* %ebp, and then when we need it we read it from the stack where we
|
||||||
|
* just pushed it.
|
||||||
*/
|
*/
|
||||||
#define VMW_PORT_HB_OUT(cmd, in_ecx, in_si, in_di, \
|
#define VMW_PORT_HB_OUT(cmd, in_ecx, in_si, in_di, \
|
||||||
port_num, magic, bp, \
|
port_num, magic, bp, \
|
||||||
eax, ebx, ecx, edx, si, di) \
|
eax, ebx, ecx, edx, si, di) \
|
||||||
({ \
|
({ \
|
||||||
asm volatile ("push %%ebp;" \
|
asm volatile ("push %12;" \
|
||||||
"mov %12, %%ebp;" \
|
"push %%ebp;" \
|
||||||
|
"mov 0x04(%%esp), %%ebp;" \
|
||||||
"rep outsb;" \
|
"rep outsb;" \
|
||||||
"pop %%ebp;" : \
|
"pop %%ebp;" \
|
||||||
|
"add $0x04, %%esp;" : \
|
||||||
"=a"(eax), \
|
"=a"(eax), \
|
||||||
"=b"(ebx), \
|
"=b"(ebx), \
|
||||||
"=c"(ecx), \
|
"=c"(ecx), \
|
||||||
|
@ -167,10 +174,12 @@
|
||||||
port_num, magic, bp, \
|
port_num, magic, bp, \
|
||||||
eax, ebx, ecx, edx, si, di) \
|
eax, ebx, ecx, edx, si, di) \
|
||||||
({ \
|
({ \
|
||||||
asm volatile ("push %%ebp;" \
|
asm volatile ("push %12;" \
|
||||||
"mov %12, %%ebp;" \
|
"push %%ebp;" \
|
||||||
|
"mov 0x04(%%esp), %%ebp;" \
|
||||||
"rep insb;" \
|
"rep insb;" \
|
||||||
"pop %%ebp" : \
|
"pop %%ebp;" \
|
||||||
|
"add $0x04, %%esp;" : \
|
||||||
"=a"(eax), \
|
"=a"(eax), \
|
||||||
"=b"(ebx), \
|
"=b"(ebx), \
|
||||||
"=c"(ecx), \
|
"=c"(ecx), \
|
||||||
|
|
Loading…
Reference in New Issue