mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
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: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221109144209.3624739-3-jani.nikula@intel.com
This commit is contained in:
parent
6274991254
commit
e2925e19c0
5 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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; \
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue