Re: [PATCH v9 1/3] i915/gvt: Separate the MMIO tracking table from GVT-g
From: Wang, Zhi A
Date: Fri Apr 08 2022 - 10:08:11 EST
Hi Jani:
Thanks so much for the help. Can you generate a new tag on drm-intel-next? I noticed that there was one patch moving the DMC related registers into display/intel_dmc_regs.h, which is not included in the latest tag on drm-intel-next.
Guess it would be better that I can change this patch according to it when checking in. This would prevent a conflict in future.
Thanks,
Zhi.
On 4/7/22 3:03 PM, Jani Nikula wrote:
> On Thu, 07 Apr 2022, Zhi Wang <zhi.wang.linux@xxxxxxxxx> wrote:
>> diff --git a/drivers/gpu/drm/i915/intel_gvt.h b/drivers/gpu/drm/i915/intel_gvt.h
>> index d7d3fb6186fd..7665d7cf0bdd 100644
>> --- a/drivers/gpu/drm/i915/intel_gvt.h
>> +++ b/drivers/gpu/drm/i915/intel_gvt.h
>> @@ -26,7 +26,17 @@
>>
>> struct drm_i915_private;
>>
>> +#include <linux/kernel.h>
>
> You only need <linux/types.h>. Please add it before the forward
> declaration above.
>
>> +
>> #ifdef CONFIG_DRM_I915_GVT
>> +
>> +struct intel_gvt_mmio_table_iter {
>> + struct drm_i915_private *i915;
>> + void *data;
>> + int (*handle_mmio_cb)(struct intel_gvt_mmio_table_iter *iter,
>> + u32 offset, u32 size);
>> +};
>> +
>> int intel_gvt_init(struct drm_i915_private *dev_priv);
>> void intel_gvt_driver_remove(struct drm_i915_private *dev_priv);
>> int intel_gvt_init_device(struct drm_i915_private *dev_priv);
>> @@ -34,6 +44,7 @@ void intel_gvt_clean_device(struct drm_i915_private *dev_priv);
>> int intel_gvt_init_host(void);
>> void intel_gvt_sanitize_options(struct drm_i915_private *dev_priv);
>> void intel_gvt_resume(struct drm_i915_private *dev_priv);
>> +int intel_gvt_iterate_mmio_table(struct intel_gvt_mmio_table_iter *iter);
>> #else
>> static inline int intel_gvt_init(struct drm_i915_private *dev_priv)
>> {
>> @@ -51,6 +62,16 @@ static inline void intel_gvt_sanitize_options(struct drm_i915_private *dev_priv)
>> static inline void intel_gvt_resume(struct drm_i915_private *dev_priv)
>> {
>> }
>> +
>> +unsigned long intel_gvt_get_device_type(struct drm_i915_private *i915)
>> +{
>> + return 0;
>> +}
>
> The CONFIG_DRM_I915_GVT=y counterpart for this is in mmio.h. Should be
> both in the same header.
>
>> +
>> +int intel_gvt_iterate_mmio_table(struct intel_gvt_mmio_table_iter *iter)
>> +{
>> + return 0;
>> +}
>> #endif
>>
>> #endif /* _INTEL_GVT_H_ */
>> diff --git a/drivers/gpu/drm/i915/intel_gvt_mmio_table.c b/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
>> new file mode 100644
>> index 000000000000..d29491a6d209
>> --- /dev/null
>> +++ b/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
>> @@ -0,0 +1,1290 @@
>> +// SPDX-License-Identifier: MIT
>> +/*
>> + * Copyright © 2020 Intel Corporation
>> + */
>> +
>> +#include "i915_drv.h"
>> +#include "i915_reg.h"
>> +#include "display/vlv_dsi_pll_regs.h"
>> +#include "gt/intel_gt_regs.h"
>> +#include "intel_mchbar_regs.h"
>> +#include "i915_pvinfo.h"
>> +#include "intel_gvt.h"
>> +#include "gvt/gvt.h"
>
> Generally we have the include lists sorted.
>
> Other than the nitpicks above, the series is
>
> Acked-by: Jani Nikula <jani.nikula@xxxxxxxxx>
>
>
> BR,
> Jani.
>
>