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 8/19/2016 11:48 PM, Chris Wilson wrote:
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;
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.
_______________________________________________
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