diff options
| author | Nam Cao <[email protected]> | 2025-07-24 17:33:27 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-07-25 13:04:14 +0000 |
| commit | 24cbfe18d55a6866bc2e27fda74306f4a1b5cb01 (patch) | |
| tree | 230f3fe45389ad87a72c7c21d89bf96130b02b77 /drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | |
| parent | rv: Remove unused field in struct rv_monitor_def (diff) | |
| download | kernel-24cbfe18d55a6866bc2e27fda74306f4a1b5cb01.tar.gz kernel-24cbfe18d55a6866bc2e27fda74306f4a1b5cb01.zip | |
rv: Merge struct rv_monitor_def into struct rv_monitor
Each struct rv_monitor has a unique struct rv_monitor_def associated with
it. struct rv_monitor is statically allocated, while struct rv_monitor_def
is dynamically allocated.
This makes the code more complicated than it should be:
- Lookup is required to get the associated rv_monitor_def from rv_monitor
- Dynamic memory allocation is required for rv_monitor_def. This is
harder to get right compared to static memory. For instance, there is
an existing mistake: rv_unregister_monitor() does not free the memory
allocated by rv_register_monitor(). This is fortunately not a real
memory leak problem, as rv_unregister_monitor() is never called.
Simplify and merge rv_monitor_def into rv_monitor.
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/194449c00f87945c207aab4c96920c75796a4f53.1753378331.git.namcao@linutronix.de
Reviewed-by: Gabriele Monaco <[email protected]>
Signed-off-by: Nam Cao <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c')
0 files changed, 0 insertions, 0 deletions
