Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3542474pxj; Mon, 24 May 2021 09:01:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4wO44ig1lFvtqxrlhlynyPDD8AXVT/nUdPW2XrRwrpUrBcfRzHW2ZCWvW8jj5f5KK8+Gf X-Received: by 2002:a05:6e02:52e:: with SMTP id h14mr16763094ils.118.1621872113253; Mon, 24 May 2021 09:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872113; cv=none; d=google.com; s=arc-20160816; b=GvM7f6VARMhA2JjwmZa59dMhKNa0E6ONqd3S7nEOkcDtkAvzSlBIb326dq2nJopJIm wwA2Te0QJsfzlfH64SpoBmmmNHh1jvNX3CUaNUWYAJ86FcfNn+n167YTzTZ/a8GmMU5T Tv+Of9DNbjBRTua2gNT8JAb7WVQWptRPidAch2yHxDj92G74W7e2WzJL9SL+lrVNHT0W 4IkiGzTERUjqHVRfdGfkSz0Q6srsKZFtsTJC6FjDK9y+NIfxIo6V3JeNqS2rUMpkjUZD WmRyXkKDfVkrvP5Q3APVizpz3WiRYTQgxp8d+T/qhdM2NlW9afG9HBLRJJFoW0DQLP0w CYfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VcSBbxj0P1QHqEGSnJ3qPaGiPB+uJKpk44UNM6Lkfxo=; b=CNQUPCqdrkwa9d4a3HeupNY3Qto9fCgl4ydAjlEjqamwtqFhADS04qiCWcSprFXn02 SeXaIa9PmPAG4fE0kYM4aeT9KxnQBIyvA1fKiKoV5stmiF3/YKYQBrU8sRajPltzpnV3 9lKI6853VDCHgdGrPNbqfWdNVh96ves0Ds80mGcdkwgKpxCvs7ttYOsTJ2zmnbhTlvxC mctPtEJ/962K8o58/D3lJEPOlJuyARqGblBLAvT6LfNq4qbezIpqq6dt8tQFAHOrehpZ qexDyjneW276UJjR7BgWZZd7Zqqo9lkO5Fy2ZHOJolBAzwK5RNgSj+lWRAdcRer+JFKV mETg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="RYN3J/eh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si14689393jak.80.2021.05.24.09.01.38; Mon, 24 May 2021 09:01:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="RYN3J/eh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235826AbhEXQCQ (ORCPT + 99 others); Mon, 24 May 2021 12:02:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:39476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235075AbhEXPzp (ORCPT ); Mon, 24 May 2021 11:55:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 161966193D; Mon, 24 May 2021 15:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870927; bh=+nPiw6xVU6hNfmq6v7MeBK/V0yme+EwadyF3lBeU0Hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RYN3J/ehoGezU3vxCWRnIdFSlku8Zm7jZxFEOPK5b58Hz7itQrrglTLDEGNoByVOA PKEei6YxAqacBSW2LtwiIOxcfMeWHz28ZKXX9HKsGieXQzumHPHX0mu/Jjt7yaGrnl 0rEgZF0Yw48NaT+yG0EcFFeslphObLhNah9mulOU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Manuel Bentele , Simon Rettberg , Dave Airlie , Rodrigo Vivi , Jani Nikula Subject: [PATCH 5.10 099/104] drm/i915/gt: Disable HiZ Raw Stall Optimization on broken gen7 Date: Mon, 24 May 2021 17:26:34 +0200 Message-Id: <20210524152336.131333680@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152332.844251980@linuxfoundation.org> References: <20210524152332.844251980@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Simon Rettberg commit 023dfa9602f561952c0e19d74f66614a56d7e57a upstream. When resetting CACHE_MODE registers, don't enable HiZ Raw Stall Optimization on Ivybridge GT1 and Baytrail, as it causes severe glitches when rendering any kind of 3D accelerated content. This optimization is disabled on these platforms by default according to official documentation from 01.org. Fixes: ef99a60ffd9b ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals") BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3081 BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3404 BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3071 Reviewed-by: Manuel Bentele Signed-off-by: Simon Rettberg Reviewed-by: Dave Airlie Signed-off-by: Rodrigo Vivi [Rodrigo removed invalid Fixes line] Link: https://patchwork.freedesktop.org/patch/msgid/20210426161124.2b7fd708@dellnichtsogutkiste (cherry picked from commit 929b734ad34b717d6a1b8de97f53bb5616040147) Signed-off-by: Jani Nikula Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/gt/gen7_renderclear.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/gt/gen7_renderclear.c +++ b/drivers/gpu/drm/i915/gt/gen7_renderclear.c @@ -397,7 +397,10 @@ static void emit_batch(struct i915_vma * gen7_emit_pipeline_invalidate(&cmds); batch_add(&cmds, MI_LOAD_REGISTER_IMM(2)); batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_0_GEN7)); - batch_add(&cmds, 0xffff0000); + batch_add(&cmds, 0xffff0000 | + ((IS_IVB_GT1(i915) || IS_VALLEYVIEW(i915)) ? + HIZ_RAW_STALL_OPT_DISABLE : + 0)); batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_1)); batch_add(&cmds, 0xffff0000 | PIXEL_SUBSPAN_COLLECT_OPT_DISABLE); gen7_emit_pipeline_invalidate(&cmds);