Commit e2925e19 authored by Jani Nikula's avatar Jani Nikula

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
...@@ -8572,7 +8572,7 @@ static void intel_mode_config_init(struct drm_i915_private *i915) ...@@ -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; struct drm_mode_config *mode_config = &i915->drm.mode_config;
drm_mode_config_init(&i915->drm); 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_width = 0;
mode_config->min_height = 0; mode_config->min_height = 0;
......
...@@ -344,6 +344,10 @@ struct intel_display { ...@@ -344,6 +344,10 @@ struct intel_display {
u32 rx_config; u32 rx_config;
} fdi; } fdi;
struct {
struct list_head obj_list;
} global;
struct { struct {
/* /*
* Base address of where the gmbus and gpio blocks are located * Base address of where the gmbus and gpio blocks are located
......
...@@ -45,14 +45,14 @@ void intel_atomic_global_obj_init(struct drm_i915_private *dev_priv, ...@@ -45,14 +45,14 @@ void intel_atomic_global_obj_init(struct drm_i915_private *dev_priv,
obj->state = state; obj->state = state;
obj->funcs = funcs; 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) void intel_atomic_global_obj_cleanup(struct drm_i915_private *dev_priv)
{ {
struct intel_global_obj *obj, *next; 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); list_del(&obj->head);
drm_WARN_ON(&dev_priv->drm, kref_read(&obj->state->ref) != 1); drm_WARN_ON(&dev_priv->drm, kref_read(&obj->state->ref) != 1);
......
...@@ -27,7 +27,7 @@ struct intel_global_obj { ...@@ -27,7 +27,7 @@ struct intel_global_obj {
}; };
#define intel_for_each_global_obj(obj, dev_priv) \ #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) \ #define for_each_new_global_obj_in_state(__state, obj, new_obj_state, __i) \
for ((__i) = 0; \ for ((__i) = 0; \
......
...@@ -292,10 +292,6 @@ struct drm_i915_private { ...@@ -292,10 +292,6 @@ struct drm_i915_private {
struct i915_gem_mm mm; struct i915_gem_mm mm;
/* Kernel Modesetting */
struct list_head global_obj_list;
bool mchbar_need_disable; bool mchbar_need_disable;
struct intel_l3_parity l3_parity; struct intel_l3_parity l3_parity;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment