@@ -754,6 +754,9 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)
/* Set up device info and initial runtime info. */
intel_device_info_driver_create(i915, pdev->device, match_info);
+ /* Transitional. To be allocated dynamically. */
+ i915->display = &i915->__display;
+
intel_display_device_probe(pdev);
return i915;
@@ -179,7 +179,8 @@ struct i915_selftest_stash {
struct drm_i915_private {
struct drm_device drm;
- struct intel_display display;
+ struct intel_display *display;
+ struct intel_display __display; /* Transitional. Do not use. */
/* FIXME: Device release actions should all be moved to drmm_ */
bool do_release;
@@ -101,6 +101,9 @@ static void display_destroy(struct drm_device *dev, void *dummy)
*/
int xe_display_create(struct xe_device *xe)
{
+ /* Transitional. To be allocated dynamically. */
+ xe->display = &xe->__display;
+
spin_lock_init(&xe->display.fb_tracking.lock);
xe->display.hotplug.dp_wq = alloc_ordered_workqueue("xe-dp", 0);
@@ -569,7 +569,8 @@ struct xe_device {
* drm_i915_private during build. After cleanup these should go away,
* migrating to the right sub-structs
*/
- struct intel_display display;
+ struct intel_display *display;
+ struct intel_display __display; /* Transitional. Do not use. */
enum intel_pch pch_type;
struct dram_info {
As the first step towards making struct intel_display an opaque pointer in i915 and xe drivers, convert the struct drm_i915_private and struct xe_device display members into pointers. Initially, add temporary struct intel_display __display members, and point display at it to avoid dynamic allocation. In follow-up, we can drop this, and switch to dynamic allocation. Note: This is just the manual parts. All the conversions all over the place are scripted, and the results of that are in a separate patch for now. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/i915_driver.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/xe/display/xe_display.c | 3 +++ drivers/gpu/drm/xe/xe_device_types.h | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-)