Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1072714ybl; Wed, 14 Aug 2019 10:15:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvgrk3P4w3BXNtDugSdbl6BDM/t2NWNh9f6OwwOkUMx/AIRf0izoPREg8dww9jIUjMJqGA X-Received: by 2002:a65:5043:: with SMTP id k3mr221343pgo.406.1565802915382; Wed, 14 Aug 2019 10:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802915; cv=none; d=google.com; s=arc-20160816; b=osHP56STRrTwvzww0w2wZTAcIezn7bZE6m+MO9cZ+jsHHerhzQ0h6z2ec1gDXWHtQ8 dQdklxAsORKD9CngdKlEujg4u/xC4AksATXsHEDJQXusQrCh4EteSb1XZlVM+Eo4r8xB LWRkef9YFFlFaTGFDLbVE2RpzP55ZRXcouwGQwIyh0jbS+PGWUSKfwEBvwgs9jiPsMoZ /kgre2DXrCfYWjR8yVxZ2PzF2f/6obVYECzGp+6cXvmt8FcsxDAJGvC1kz9IMBCxv4U7 rdGLOiaQWNhawLLJTJAjfDUgArfGxRzzlezGneOtJVMiUOVAF2o/rS6FnPMSema3qTkY 8Dcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ed5rYYfx/rvEzMA7TyRmVzERnvQ5Edu+rCiV8eIGd6o=; b=bAlikdGwAHK7aYw6mLV1ZkmpIIYy3mjFlwJjBQurqxd3+Dga7wb6fMPA+EfS/xw9Mc eyWV1ZV6Zww0h4NCsPia5P47h0ftBhcFWbzS3Vla+9KXBPrbOzGxVWEuNz2b9qph2P5/ QOYmO2jSOFtT9aol/9w8aipTN24PDWEh7mw1dL+KCMsUfLJF1xw0r2LrGK6NnLC2vc5X 8bDg9m0OnstLGmCE3gvCQFNUKJFhBUEULENdiKwmaD4H4sgBbuzUB39i6e8UTCh0v0eU D5W8JNmbQcAsQkDFev8IHqx6Y8xctocZQ36FEj3Gk5oUXX224//B30A5ccBxbarfsh4c k02Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MzidlgLA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38si250752pla.216.2019.08.14.10.14.59; Wed, 14 Aug 2019 10:15:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MzidlgLA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730131AbfHNROX (ORCPT + 99 others); Wed, 14 Aug 2019 13:14:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:38830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731064AbfHNROW (ORCPT ); Wed, 14 Aug 2019 13:14:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A46B8208C2; Wed, 14 Aug 2019 17:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802861; bh=6x8AFhRj1EO0tbyspskxethUmHszG//jXzxC6/aIAZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MzidlgLApAojs+ubixfblFgL23Brmyr7xMf7thT3YW6aKrDVe5XhBd0SsyiA00Wlu Dx99wFOc/6xMvCKaUNSJyw4m/9WVeLrGfW5FkHNA0ZzVl8ze0wE+II3hoUCuf+n8QK t6209uqeKpdVVIWOh6CTSMNbT5EmufkmQyrx/ZhA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stanislav Lisovskiy , Vandita Kulkarni , Deepak M , Madhav Chauhan , Jani Nikula , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , intel-gfx@lists.freedesktop.org Subject: [PATCH 4.14 55/69] drm/i915: Fix wrong escape clock divisor init for GLK Date: Wed, 14 Aug 2019 19:01:53 +0200 Message-Id: <20190814165749.231806301@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165744.822314328@linuxfoundation.org> References: <20190814165744.822314328@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stanislav Lisovskiy commit 73a0ff0b30af79bf0303d557eb82f1d1945bb6ee upstream. According to Bspec clock divisor registers in GeminiLake should be initialized by shifting 1(<<) to amount of correspondent divisor. While i915 was writing all this time that value as is. Surprisingly that it by accident worked, until we met some issues with Microtech Etab. v2: Added Fixes tag and cc v3: Added stable to cc as well. Signed-off-by: Stanislav Lisovskiy Reviewed-by: Vandita Kulkarni Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108826 Fixes: bcc657004841 ("drm/i915/glk: Program txesc clock divider for GLK") Cc: Deepak M Cc: Madhav Chauhan Cc: Jani Nikula Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190712081938.14185-1-stanislav.lisovskiy@intel.com (cherry picked from commit ce52ad5dd52cfaf3398058384e0ff94134bbd89c) Signed-off-by: Jani Nikula Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_dsi_pll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/i915/intel_dsi_pll.c +++ b/drivers/gpu/drm/i915/intel_dsi_pll.c @@ -422,8 +422,8 @@ static void glk_dsi_program_esc_clock(st else txesc2_div = 10; - I915_WRITE(MIPIO_TXESC_CLK_DIV1, txesc1_div & GLK_TX_ESC_CLK_DIV1_MASK); - I915_WRITE(MIPIO_TXESC_CLK_DIV2, txesc2_div & GLK_TX_ESC_CLK_DIV2_MASK); + I915_WRITE(MIPIO_TXESC_CLK_DIV1, (1 << (txesc1_div - 1)) & GLK_TX_ESC_CLK_DIV1_MASK); + I915_WRITE(MIPIO_TXESC_CLK_DIV2, (1 << (txesc2_div - 1)) & GLK_TX_ESC_CLK_DIV2_MASK); } /* Program BXT Mipi clocks and dividers */