[Intel-gfx] [PATCH 15/19] drm/i915: Debugfs support for GuC logging control
Goel, Akash
akash.goel at intel.com
Sat Aug 20 06:40:31 UTC 2016
On 8/19/2016 11:48 PM, Chris Wilson wrote:
> On Fri, Aug 19, 2016 at 02:13:14PM +0530, akash.goel at intel.com wrote:
>> +static int i915_guc_log_control_get(void *data, u64 *val)
>> +{
>> + struct drm_device *dev = data;
>> + struct drm_i915_private *dev_priv = to_i915(dev);
>> +
>> + if (!dev_priv->guc.log.vma)
>> + return -EINVAL;
>
> return -ENODEV;
Fine will change the return code.
>
>> +
>> + *val = i915.guc_log_level;
>> +
>> + return 0;
>> +}
>> +
>> +static int i915_guc_log_control_set(void *data, u64 val)
>> +{
>> + struct drm_device *dev = data;
>> + struct drm_i915_private *dev_priv = to_i915(dev);
>> + int ret;
>
> if (!dev_priv->guc.log.vma)
> return -ENODEV;
>
> you don't need struct_mutex to check for its existence.
>
Fine will lock the struct_mutex after the NULL vma check.
More information about the Intel-gfx
mailing list