Re: [RFC 04/14] drm/i915: Add a couple intel_gt helpers

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

 



Quoting Tvrtko Ursulin (2019-06-10 16:54:09)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Two trivial helpers to convert from intel_gt to i915 and uncore which will
> be needed by the following patches.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt.h | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644 drivers/gpu/drm/i915/gt/intel_gt.h
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h
> new file mode 100644
> index 000000000000..b672f8b03bfd
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.h
> @@ -0,0 +1,26 @@
> +/*
> + * SPDX-License-Identifier: MIT
> + *
> + * Copyright © 2019 Intel Corporation
> + */
> +
> +#ifndef __INTEL_GT__
> +#define __INTEL_GT__
> +
> +#include "gt/intel_gt_types.h"
> +
> +#include "intel_uncore.h"
> +
> +#include "i915_drv.h"
> +
> +static inline struct drm_i915_private *gt_to_i915(struct intel_gt *gt)
> +{
> +       return container_of(gt, struct drm_i915_private, gt);

Ok, I can buy that a single i915 device will only have a single GT slot.

> +}
> +
> +static inline struct intel_uncore *gt_to_uncore(struct intel_gt *gt)
> +{
> +       return &gt_to_i915(gt)->uncore;

But I suspect it will be cleaner just to have a gt->uncore pointer. With
any luck, Daniele's splitting of display and GT uncore bears fruit and
it will be distinct without its own set of locks, powerwells and
cacheline rules.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux