The ssd130x_crtc_create_state() implementation warns when the CRTC
already has a state, assuming that atomic_create_state would only ever
be called at initialization time to allocate the initial state.

However, atomic_create_state is documented to have no side effect and
can be called at runtime, so that assumption doesn't hold and the WARN
is a side effect in itself.

Let's drop the WARN, along with the comment documenting that
assumption.

Fixes: 1345de7fe9114 ("drm/solomon: ssd130x: Convert to atomic_create_state")
Signed-off-by: Maxime Ripard <[email protected]>

---

To: Javier Martinez Canillas <[email protected]>
---
 drivers/gpu/drm/solomon/ssd130x.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/solomon/ssd130x.c 
b/drivers/gpu/drm/solomon/ssd130x.c
index 4901a1835f44..a6dbefb37b2c 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -1755,11 +1755,8 @@ static int ssd133x_crtc_atomic_check(struct drm_crtc 
*crtc,
 }
 
-/* Called during init to allocate the CRTC's atomic state. */
 static struct drm_crtc_state *ssd130x_crtc_create_state(struct drm_crtc *crtc)
 {
        struct ssd130x_crtc_state *ssd130x_state;
 
-       drm_WARN_ON_ONCE(crtc->dev, crtc->state);
-
        ssd130x_state = kzalloc_obj(*ssd130x_state);
        if (!ssd130x_state)

-- 
2.55.0

Reply via email to