Re: [RFC 3/7] drm/i915: Move all runtime modified device info fields into runtime info

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

 




On 12/11/2018 21:22, Lucas De Marchi wrote:
On Mon, Nov 12, 2018 at 05:12:38PM +0000, Tvrtko Ursulin wrote:
From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

After the previous change which cleared the static tables from effectively
unused storage, we now replicate entries which have defaults set from
there, but can be overriden at runtime.

For this class of variables all accessor macros and call sites are changed
to use the runtime version. Therefore at driver load we need to copy over
these variables from static to the runtime table.

We add double prefixes to the affected device info members to signify they
are special and to catch all current and future users.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
---

[...]

diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 43ed8b28aeaa..b6849ca11e01 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -174,12 +174,11 @@ struct drm_i915_private *mock_gem_device(void)
  	/* Using the global GTT may ask questions about KMS users, so prepare */
  	drm_mode_config_init(&i915->drm);
- mkwrite_device_info(i915)->gen = -1;
+	i915->runtime_info.gen = -1;

this seems the only place that is setting gen to something not statically
defined. And it also misses that it'd need to set gen_mask, too.

Could we rather define a device_info for the mock device with the
proper values rather than doing this?

That would be indeed preferable and I hated the runtime edit of the gen myself. For the RFC I just did not spend the time to investigate why the mock device needs this etc. Marking as TODO.

Regards,

Tvrtko
_______________________________________________
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