aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/omapdrm/dss/sdi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
index 68a40ae26f5b..1e2c931f6acf 100644
--- a/drivers/gpu/drm/omapdrm/dss/sdi.c
+++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
@@ -82,7 +82,7 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
82 struct dispc_clock_info *dispc_cinfo) 82 struct dispc_clock_info *dispc_cinfo)
83{ 83{
84 int i; 84 int i;
85 struct sdi_clk_calc_ctx ctx = { .sdi = sdi }; 85 struct sdi_clk_calc_ctx ctx;
86 86
87 /* 87 /*
88 * DSS fclk gives us very few possibilities, so finding a good pixel 88 * DSS fclk gives us very few possibilities, so finding a good pixel
@@ -95,6 +95,9 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
95 bool ok; 95 bool ok;
96 96
97 memset(&ctx, 0, sizeof(ctx)); 97 memset(&ctx, 0, sizeof(ctx));
98
99 ctx.sdi = sdi;
100
98 if (pclk > 1000 * i * i * i) 101 if (pclk > 1000 * i * i * i)
99 ctx.pck_min = max(pclk - 1000 * i * i * i, 0lu); 102 ctx.pck_min = max(pclk - 1000 * i * i * i, 0lu);
100 else 103 else