From patchwork Wed Apr 29 02:55:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1278909 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=TmuhrTyG; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49BjnB19DNz9sSh; Wed, 29 Apr 2020 12:55:42 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jTcsr-0007ZH-Ol; Wed, 29 Apr 2020 02:55:37 +0000 Received: from mail-pl1-f195.google.com ([209.85.214.195]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jTcsp-0007YT-4W for kernel-team@lists.ubuntu.com; Wed, 29 Apr 2020 02:55:35 +0000 Received: by mail-pl1-f195.google.com with SMTP id s20so300140plp.6 for ; Tue, 28 Apr 2020 19:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R9eO0PCO1DqAyTflQAJFiF2XxFR1toRMEGQsj+OLBfg=; b=TmuhrTyG7pNVeaxpLHE/W6dmfA13vNmXVMD7lMC1OITXyyPJRCSSaP1GJOYaoQahgP vKllKz3TCL7k9hM7k2AWxiHqcaJYt8GWXILZiS1usb6k7TzZNOLHhK9K0ixE5+lC2XB1 hZQHgxkI9fwUqm+iXPoOjFl/hS90AA4rkVJG98iHmciqMY3ocQ+rBb3jt+3EA7I85ine ByhoQSOyrFQKSyj/xySpha32I9Rz4Xu7Gln/7sJFAX53zMs0wOqOBCMkYfF/To1MHqk2 AT0r/ZcNKgF153wHw6g/uqeT1LXRk9Xm5NhsEDa+qZq2wjGeRBsfkHfAjtCXKYJ2Wqtd kplA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=R9eO0PCO1DqAyTflQAJFiF2XxFR1toRMEGQsj+OLBfg=; b=BGuMLt8vNkFqS6ngIPf08hnnIbvO6uJJHoHTf+txQVbvpCeUJGr+p6HpCLHaMShy1r olLr9FVeq0LmA6QEaSDggezKaFy5QyeRBHtDJCdzW9xpUsXp7fkTi8jC8eNDJsUZD5KM HehGmPdO/FCG1psk2YTPPJuhUUFMuHPf0xpTYUxx7alKd9H6ustCGaxbmm+URZ1I1ilg i2U8dDXqjAS6kfBtrjJt1LqVUxeWs2Jd+WCT2RCRgj5V738PDALWN4ZmvOcUOz6kq2X0 we6iyKhOCa9UNavZ9Gp9elZoabauT7zwXEYyVUoYOElpRaP44HokZHxX6+pGpH2+S4hc V+pw== X-Gm-Message-State: AGi0PubJt62lq+W6a4axwAQk44QnuF5k0jt+XhF/VrJvk3g3+QZoZHdc lXJwlj8rTnByVaV9S2qrY7cXYl1m X-Google-Smtp-Source: APiQypIcRVrZvAsqWYxKUMHzjDrcYac0KN7FBBtqohZQk6mj0ur1a+ONNul/SRluJfFkyy6nWgaRqQ== X-Received: by 2002:a17:902:bd09:: with SMTP id p9mr19845608pls.214.1588128933333; Tue, 28 Apr 2020 19:55:33 -0700 (PDT) Received: from localhost (220-135-95-34.HINET-IP.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id r12sm14056915pgv.59.2020.04.28.19.55.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 19:55:32 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][Focal] drm/i915: Limit audio CDCLK>=2*BCLK constraint back to GLK only Date: Wed, 29 Apr 2020 10:55:28 +0800 Message-Id: <20200429025528.236678-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200429025528.236678-1-acelan.kao@canonical.com> References: <20200429025528.236678-1-acelan.kao@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Kai Vehmanen BugLink: https://bugs.launchpad.net/bugs/1875254 Revert changes done in commit f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms"). Audio drivers communicate with i915 over HDA bus multiple times during system boot-up and each of these transactions result in matching get_power/put_power calls to i915, and depending on the platform, a modeset change causing visible flicker. GLK is the only platform with minimum CDCLK significantly lower than BCLK, and thus for GLK setting a higher CDCLK is mandatory. For other platforms, minimum CDCLK is close but below 2*BCLK (e.g. on ICL, CDCLK=176.4kHz with BCLK=96kHz). Spec-wise the constraint should be set, but in practise no communication errors have been reported and the downside if set is the flicker observed at boot-time. Revert to old behaviour until better mechanism to manage probe-time clocks is available. The full CDCLK>=2*BCLK constraint is still enforced at pipe enable time in intel_crtc_compute_min_cdclk(). Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/913 Fixes: f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms") Signed-off-by: Kai Vehmanen Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191231140007.31728-1-kai.vehmanen@linux.intel.com (bacported from commit 1ee48a61aa57dbdbc3cd2808d8b28df40d938e44) Signed-off-by: AceLan Kao Acked-by: You-Sheng Yang --- drivers/gpu/drm/i915/display/intel_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c index 191561f0834b..5d4986633ab7 100644 --- a/drivers/gpu/drm/i915/display/intel_audio.c +++ b/drivers/gpu/drm/i915/display/intel_audio.c @@ -852,7 +852,7 @@ static unsigned long i915_audio_component_get_power(struct device *kdev) /* Force CDCLK to 2*BCLK as long as we need audio to be powered. */ if (dev_priv->audio_power_refcount++ == 0) { - if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) + if (IS_GEMINILAKE(dev_priv)) glk_force_audio_cdclk(dev_priv, true); if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) @@ -871,7 +871,7 @@ static void i915_audio_component_put_power(struct device *kdev, /* Stop forcing CDCLK to 2*BCLK if no need for audio to be powered. */ if (--dev_priv->audio_power_refcount == 0) - if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) + if (IS_GEMINILAKE(dev_priv)) glk_force_audio_cdclk(dev_priv, false); intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO, cookie);