drm/i915: move atomic_helper under display sub-struct
Move display atomic helper related members under drm_i915_private display sub-struct. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1d864238a92a32d52ea70c0079c910cc90955324.1661779055.git.jani.nikula@intel.com
This commit is contained in:
parent
6493d4a96f
commit
a71e7d77fb
|
@ -7409,7 +7409,7 @@ static void intel_atomic_helper_free_state(struct drm_i915_private *dev_priv)
|
||||||
struct intel_atomic_state *state, *next;
|
struct intel_atomic_state *state, *next;
|
||||||
struct llist_node *freed;
|
struct llist_node *freed;
|
||||||
|
|
||||||
freed = llist_del_all(&dev_priv->atomic_helper.free_list);
|
freed = llist_del_all(&dev_priv->display.atomic_helper.free_list);
|
||||||
llist_for_each_entry_safe(state, next, freed, freed)
|
llist_for_each_entry_safe(state, next, freed, freed)
|
||||||
drm_atomic_state_put(&state->base);
|
drm_atomic_state_put(&state->base);
|
||||||
}
|
}
|
||||||
|
@ -7417,7 +7417,7 @@ static void intel_atomic_helper_free_state(struct drm_i915_private *dev_priv)
|
||||||
static void intel_atomic_helper_free_state_worker(struct work_struct *work)
|
static void intel_atomic_helper_free_state_worker(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv =
|
struct drm_i915_private *dev_priv =
|
||||||
container_of(work, typeof(*dev_priv), atomic_helper.free_work);
|
container_of(work, typeof(*dev_priv), display.atomic_helper.free_work);
|
||||||
|
|
||||||
intel_atomic_helper_free_state(dev_priv);
|
intel_atomic_helper_free_state(dev_priv);
|
||||||
}
|
}
|
||||||
|
@ -7709,7 +7709,7 @@ intel_atomic_commit_ready(struct i915_sw_fence *fence,
|
||||||
case FENCE_FREE:
|
case FENCE_FREE:
|
||||||
{
|
{
|
||||||
struct intel_atomic_helper *helper =
|
struct intel_atomic_helper *helper =
|
||||||
&to_i915(state->base.dev)->atomic_helper;
|
&to_i915(state->base.dev)->display.atomic_helper;
|
||||||
|
|
||||||
if (llist_add(&state->freed, &helper->free_list))
|
if (llist_add(&state->freed, &helper->free_list))
|
||||||
schedule_work(&helper->free_work);
|
schedule_work(&helper->free_work);
|
||||||
|
@ -8699,8 +8699,8 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto cleanup_vga_client_pw_domain_dmc;
|
goto cleanup_vga_client_pw_domain_dmc;
|
||||||
|
|
||||||
init_llist_head(&i915->atomic_helper.free_list);
|
init_llist_head(&i915->display.atomic_helper.free_list);
|
||||||
INIT_WORK(&i915->atomic_helper.free_work,
|
INIT_WORK(&i915->display.atomic_helper.free_work,
|
||||||
intel_atomic_helper_free_state_worker);
|
intel_atomic_helper_free_state_worker);
|
||||||
|
|
||||||
intel_init_quirks(i915);
|
intel_init_quirks(i915);
|
||||||
|
@ -8993,8 +8993,8 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915)
|
||||||
flush_workqueue(i915->display.wq.flip);
|
flush_workqueue(i915->display.wq.flip);
|
||||||
flush_workqueue(i915->display.wq.modeset);
|
flush_workqueue(i915->display.wq.modeset);
|
||||||
|
|
||||||
flush_work(&i915->atomic_helper.free_work);
|
flush_work(&i915->display.atomic_helper.free_work);
|
||||||
drm_WARN_ON(&i915->drm, !llist_empty(&i915->atomic_helper.free_list));
|
drm_WARN_ON(&i915->drm, !llist_empty(&i915->display.atomic_helper.free_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* part #2: call after irq uninstall */
|
/* part #2: call after irq uninstall */
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#define __INTEL_DISPLAY_CORE_H__
|
#define __INTEL_DISPLAY_CORE_H__
|
||||||
|
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
|
#include <linux/llist.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/wait.h>
|
#include <linux/wait.h>
|
||||||
|
@ -268,6 +269,11 @@ struct intel_display {
|
||||||
} funcs;
|
} funcs;
|
||||||
|
|
||||||
/* Grouping using anonymous structs. Keep sorted. */
|
/* Grouping using anonymous structs. Keep sorted. */
|
||||||
|
struct intel_atomic_helper {
|
||||||
|
struct llist_head free_list;
|
||||||
|
struct work_struct free_work;
|
||||||
|
} atomic_helper;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
/* backlight registers and fields in struct intel_panel */
|
/* backlight registers and fields in struct intel_panel */
|
||||||
struct mutex lock;
|
struct mutex lock;
|
||||||
|
|
|
@ -301,11 +301,6 @@ struct drm_i915_private {
|
||||||
|
|
||||||
struct list_head global_obj_list;
|
struct list_head global_obj_list;
|
||||||
|
|
||||||
struct intel_atomic_helper {
|
|
||||||
struct llist_head free_list;
|
|
||||||
struct work_struct free_work;
|
|
||||||
} atomic_helper;
|
|
||||||
|
|
||||||
bool mchbar_need_disable;
|
bool mchbar_need_disable;
|
||||||
|
|
||||||
struct intel_l3_parity l3_parity;
|
struct intel_l3_parity l3_parity;
|
||||||
|
|
Loading…
Reference in New Issue