<div dir="ltr">Thanks, looks good and is<div><div>Reviewed-by: Jakob Bornecrantz <<a href="mailto:jakob@vmware.com" target="_blank">jakob@vmware.com</a>></div></div><div><br></div><div style>Cheers, Jakob.</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 3:10 PM, <span dir="ltr"><<a href="mailto:ville.syrjala@linux.intel.com" target="_blank">ville.syrjala@linux.intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a>><br>
<br>
We want to disable the cursor by calling ->cursor_set() with handle=0<br>
from places where we don't have a file_priv, so don't try to access it<br>
unless necessary.<br>
<br>
Signed-off-by: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a>><br>
---<br>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c<br>
index 3e3c7ab..d4607b2 100644<br>
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c<br>
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c<br>
@@ -174,7 +174,6 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,<br>
uint32_t handle, uint32_t width, uint32_t height)<br>
{<br>
struct vmw_private *dev_priv = vmw_priv(crtc->dev);<br>
- struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile;<br>
struct vmw_display_unit *du = vmw_crtc_to_du(crtc);<br>
struct vmw_surface *surface = NULL;<br>
struct vmw_dma_buffer *dmabuf = NULL;<br>
@@ -197,6 +196,8 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,<br>
}<br>
<br>
if (handle) {<br>
+ struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile;<br>
+<br>
ret = vmw_user_lookup_handle(dev_priv, tfile,<br>
handle, &surface, &dmabuf);<br>
if (ret) {<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.1.5<br>
<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</font></span></blockquote></div><br></div>