Re: [PATCH 15/19] drm/i915: Debugfs support for GuC logging control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 19, 2016 at 02:13:14PM +0530, akash.goel@xxxxxxxxx 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;

> +
> +	*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.

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux