[RFC PATCH 37/37] Tegra: SOR: Don't always assume a valid mode
Daniel Stone
daniels at collabora.com
Wed Mar 18 21:33:36 PDT 2015
CRTCs might have a NULL mode if they're being disabled.
Signed-off-by: Daniel Stone <daniels at collabora.com>
---
drivers/gpu/drm/tegra/sor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index d0eaa48..0f8aa2c 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1282,7 +1282,8 @@ tegra_sor_encoder_atomic_check(struct drm_encoder *encoder,
{
struct tegra_output *output = encoder_to_output(encoder);
struct tegra_dc *dc = to_tegra_dc(conn_state->crtc);
- unsigned long pclk = crtc_state->mode->clock * 1000;
+ unsigned long pclk =
+ crtc_state->mode ? crtc_state->mode->clock * 1000 : 0;
struct tegra_sor *sor = to_sor(output);
int err;
--
2.3.2
More information about the dri-devel
mailing list