diff options
| author | Abhinav Kumar <[email protected]> | 2021-04-16 20:57:19 +0000 |
|---|---|---|
| committer | Rob Clark <[email protected]> | 2021-06-23 14:32:13 +0000 |
| commit | a4324a7a1c3d57ecfba0fee3e8b2d370eb5597c9 (patch) | |
| tree | de2d0ad2bc8c395cfa915b18a9afff72f5a4d1e6 /drivers/gpu/drm/drm_atomic_uapi.c | |
| parent | drm/msm/dp: handle irq_hpd with sink_count = 0 correctly (diff) | |
| download | kernel-a4324a7a1c3d57ecfba0fee3e8b2d370eb5597c9.tar.gz kernel-a4324a7a1c3d57ecfba0fee3e8b2d370eb5597c9.zip | |
drm: allow drm_atomic_print_state() to accept any drm_printer
Currently drm_atomic_print_state() internally allocates and uses a
drm_info printer. Allow it to accept any drm_printer type so that
the API can be leveraged even for taking drm snapshot.
Rename the drm_atomic_print_state() to drm_atomic_print_new_state()
so that it reflects its functionality better.
changes in v5:
- none
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Abhinav Kumar <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_uapi.c')
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_uapi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 268bb69c2e2f..c340a67a158f 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -2,6 +2,7 @@ * Copyright (C) 2014 Red Hat * Copyright (C) 2014 Intel Corp. * Copyright (C) 2018 Intel Corp. + * Copyright (c) 2020, The Linux Foundation. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1321,6 +1322,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, struct drm_out_fence_state *fence_state; int ret = 0; unsigned int i, j, num_fences; + struct drm_printer p = drm_info_printer(dev->dev); /* disallow for drivers not supporting atomic: */ if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) @@ -1453,7 +1455,7 @@ retry: ret = drm_atomic_nonblocking_commit(state); } else { if (drm_debug_enabled(DRM_UT_STATE)) - drm_atomic_print_state(state); + drm_atomic_print_new_state(state, &p); ret = drm_atomic_commit(state); } |
