<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 20, 2016 at 11:52 PM, Chris Wilson <span dir="ltr"><<a href="mailto:chris@chris-wilson.co.uk" target="_blank">chris@chris-wilson.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote:<br>
</span><span class="">> +static int i915_oa_read(struct i915_perf_stream *stream,<br>
> +                     struct i915_perf_read_state *read_state)<br>
> +{<br>
> +     struct drm_i915_private *dev_priv = stream->dev_priv;<br>
> +<br>
> +     return dev_priv->perf.oa.ops.read(stream, read_state);<br>
> +}<br>
<br>
</span><span class="">> +     stream->destroy = i915_oa_stream_destroy;<br>
> +     stream->enable = i915_oa_stream_enable;<br>
> +     stream->disable = i915_oa_stream_disable;<br>
> +     stream->can_read = i915_oa_can_read;<br>
> +     stream->wait_unlocked = i915_oa_wait_unlocked;<br>
> +     stream->poll_wait = i915_oa_poll_wait;<br>
> +     stream->read = i915_oa_read;<br>
<br>
</span>Why aren't these a const ops table?<br></blockquote><div><br></div><div>No particular reason; I guess it just seemed straightforward enough at the time. I suppose it avoids some redundant pointer indirection and could suit defining streams in the future that might find it awkward to have static ops (don't have anything like that in mind though) but it's at the expense of a slightly larger stream struct (though also don't see that as a concern currently).<br><br></div><div>Can change if you like.<br><br></div><div>Regards,<br></div><div>- Robert<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">-Chris<br>
<br>
--<br>
Chris Wilson, Intel Open Source Technology Centre<br>
</div></div></blockquote></div><br></div></div>