Commit e2925e19 authored by Jani Nikula's avatar Jani Nikula
Browse files

drm/i915/display: move global_obj_list under display sub-struct



Move display global state member under drm_i915_private display
sub-struct.

Prefer adding anonymous sub-structs even for single members that aren't
our own structs.

Remove a nearby stale comment while at it.

Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221109144209.3624739-3-jani.nikula@intel.com
parent 62749912
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8572,7 +8572,7 @@ static void intel_mode_config_init(struct drm_i915_private *i915)
	struct drm_mode_config *mode_config = &i915->drm.mode_config;

	drm_mode_config_init(&i915->drm);
	INIT_LIST_HEAD(&i915->global_obj_list);
	INIT_LIST_HEAD(&i915->display.global.obj_list);

	mode_config->min_width = 0;
	mode_config->min_height = 0;
+4 −0
Original line number Diff line number Diff line
@@ -344,6 +344,10 @@ struct intel_display {
		u32 rx_config;
	} fdi;

	struct {
		struct list_head obj_list;
	} global;

	struct {
		/*
		 * Base address of where the gmbus and gpio blocks are located
+2 −2
Original line number Diff line number Diff line
@@ -45,14 +45,14 @@ void intel_atomic_global_obj_init(struct drm_i915_private *dev_priv,

	obj->state = state;
	obj->funcs = funcs;
	list_add_tail(&obj->head, &dev_priv->global_obj_list);
	list_add_tail(&obj->head, &dev_priv->display.global.obj_list);
}

void intel_atomic_global_obj_cleanup(struct drm_i915_private *dev_priv)
{
	struct intel_global_obj *obj, *next;

	list_for_each_entry_safe(obj, next, &dev_priv->global_obj_list, head) {
	list_for_each_entry_safe(obj, next, &dev_priv->display.global.obj_list, head) {
		list_del(&obj->head);

		drm_WARN_ON(&dev_priv->drm, kref_read(&obj->state->ref) != 1);
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ struct intel_global_obj {
};

#define intel_for_each_global_obj(obj, dev_priv) \
	list_for_each_entry(obj, &(dev_priv)->global_obj_list, head)
	list_for_each_entry(obj, &(dev_priv)->display.global.obj_list, head)

#define for_each_new_global_obj_in_state(__state, obj, new_obj_state, __i) \
	for ((__i) = 0; \
+0 −4
Original line number Diff line number Diff line
@@ -292,10 +292,6 @@ struct drm_i915_private {

	struct i915_gem_mm mm;

	/* Kernel Modesetting */

	struct list_head global_obj_list;

	bool mchbar_need_disable;

	struct intel_l3_parity l3_parity;