<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 7, 2016 at 10:10 AM, Matthew Auld <span dir="ltr"><<a href="mailto:matthew.william.auld@gmail.com" target="_blank">matthew.william.auld@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 14 September 2016 at 16:32, Robert Bragg <<a href="mailto:robert@sixbynine.org">robert@sixbynine.org</a>> wrote:<br><br>
> +<br>
> +int i915_perf_open_ioctl_locked(<wbr>struct drm_device *dev,<br>
> + struct drm_i915_perf_open_param *param,<br>
> + struct perf_open_properties *props,<br>
> + struct drm_file *file)<br>
> +{<br>
</div></div>This should be static and also let's just make it take dev_priv directly.<br></blockquote><div><br></div><div>Ah, yep, done.<br><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> + case DRM_I915_PERF_PROP_MAX:<br>
> + BUG();<br>
</span>We already handle this case above, but I guess we still need this in<br>
order to silence gcc...<br></blockquote><div><br></div><div>right, and preferable to having a default: case, for the future compiler warning to handle any new properties here.<br></div><div> <br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br>
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h<br>
> index 03725fe..77fe79b 100644<br>
> --- a/include/uapi/drm/i915_drm.h<br>
> +++ b/include/uapi/drm/i915_drm.h<br>
> @@ -258,6 +258,7 @@ typedef struct _drm_i915_sarea {<br>
> #define DRM_I915_GEM_USERPTR 0x33<br>
> #define DRM_I915_GEM_CONTEXT_GETPARAM 0x34<br>
> #define DRM_I915_GEM_CONTEXT_SETPARAM 0x35<br>
> +#define DRM_I915_PERF_OPEN 0x36<br>
><br>
> #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)<br>
> #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)<br>
> @@ -311,6 +312,7 @@ typedef struct _drm_i915_sarea {<br>
> #define DRM_IOCTL_I915_GEM_USERPTR DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_USERPTR, struct drm_i915_gem_userptr)<br>
> #define DRM_IOCTL_I915_GEM_CONTEXT_<wbr>GETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param)<br>
> #define DRM_IOCTL_I915_GEM_CONTEXT_<wbr>SETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param)<br>
> +#define DRM_IOCTL_I915_PERF_OPEN DRM_IOR(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param)<br>
</div></div>As you already pointed out this will need to be IOW.<br></blockquote><div><br></div><div>Yeah, changed locally after I realised the mistake here, just didn't get around to posting the patch.<br></div><div> <br><br></div><div>Also applied the notes to not redundantly init some vars, spurious new line, redundant include.<br><br></div><div>Thanks,<br></div><div>- Robert<br></div></div><br></div></div>