From: Rodrigo Vivi Date: Tue, 14 Nov 2017 19:47:57 +0000 (-0800) Subject: drm/i915/cnl: Don't blindly replace qdiv. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cacf6fe7c6c4ac9e748f41d0de4293b2aea5ae07;p=openwrt%2Fstaging%2Fblogic.git drm/i915/cnl: Don't blindly replace qdiv. Accordingly to spec "If Kdiv != 2, then Qdiv must be 1." but we already handle qdiv values properly and this case here should be spurious. But instead of blindly replacing let's warn loudly instead. Because it means something was really wrong on initial setup. Cc: Mika Kahola Cc: Manasi Navare Cc: James Ausmus Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20171114194759.24541-6-rodrigo.vivi@intel.com --- diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c index 6cc12abdd39e..361b7102b602 100644 --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c @@ -2184,8 +2184,7 @@ static void cnl_wrpll_params_populate(struct skl_wrpll_params *params, WARN(1, "Incorrect PDiv\n"); } - if (kdiv != 2) - qdiv = 1; + WARN_ON(kdiv != 2 && qdiv != 1); params->qdiv_ratio = qdiv; params->qdiv_mode = (qdiv == 1) ? 0 : 1;