Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp2691809pxx; Sun, 1 Nov 2020 06:44:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4rpRfdmAvFHF1nIOjPf8NNbJrMrQZhJFZSyHfjJ94iDxks6hj6oWV4rOQPxFq/fUzp1gC X-Received: by 2002:aa7:cd8e:: with SMTP id x14mr12716548edv.173.1604241893955; Sun, 01 Nov 2020 06:44:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604241893; cv=none; d=google.com; s=arc-20160816; b=kr19sOpFoKAt+eoCNbsOoM3VjNKI+cf1PUfm0/3MonoBwUQbC9tNrf/JrA1fOkekn3 JbsvkTnFycL2l66zb/Bq+bzeP6mMqXhC5PQAe3Cuw7E78Bu5yb99LcNqDBjM/G1p/+jQ uXobFY0wdddb7nFJKgSHK1iNBvcMZ3y0hTXDwCXyy9AtsIxpNYPm7U+Vtl22WpLPDvYL 0rm+OuP8jem7sfZ8kVzw+0FenZ5Rp8iy32wBc0dZzvNGWS9zrIpvmProFEGD87m2ZbwS bjRyW1qPA6RFOrye9PmoCrlGewPb+pKs3E1y7QouAI2ZwxKKr6z/nDIy71G/QLWZE72S eomQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=yv27s7RCBX/TWQjfzBWzQfYgerna7orjR+8Y7ZUqguI=; b=KjB5IdMq8jFu7naVHyKEKQjGlTt5OM7mpdtDnUTfPaAhS88SUzs1LHJKoHNfP0u9nz rvHV2CVY5lfSg6Ef+lUxnNqgOBhFIZb5g1tcleTPY7dqm02XX+oIuV4vBzwNZ2E3wASP 2y1RYhPAev58ekgT8qGcoPM/gqEnkHHLpWQ+qcE335OQhb3LNSXe1NBkxjp31ChXYV3y 3TwouR+qOBQbxQv/Jv4WptJ2lJTzVIXZhXJ535OcYr/jY++0ZfI9mjYjHjKrfwC0xkp3 6XzZ/aLpNDOUUQUMs9ViYKubvoPcPCWS9I1yhkAaW7Wqe6/EH6Nme7eL9Xafx+/yePMJ KpNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=bjNLOQV5; 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=hpe.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c21si8279162eja.739.2020.11.01.06.44.31; Sun, 01 Nov 2020 06:44:53 -0800 (PST) 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=@hpe.com header.s=pps0720 header.b=bjNLOQV5; 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=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726736AbgKAOnI (ORCPT + 99 others); Sun, 1 Nov 2020 09:43:08 -0500 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]:50502 "EHLO mx0a-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726499AbgKAOnH (ORCPT ); Sun, 1 Nov 2020 09:43:07 -0500 Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A1EgrGU020387; Sun, 1 Nov 2020 14:42:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : mime-version; s=pps0720; bh=yv27s7RCBX/TWQjfzBWzQfYgerna7orjR+8Y7ZUqguI=; b=bjNLOQV5RV9jjfxMpG3nFxY0LXe/XIeyukJ+GfkwB++Mcbo1UX3z7ZhUTsw8rEAb+z/n QeqD43pRxexMm5y5S/CTyqg8fIDJPlqftnQWT6sq6nq6U4uwNDREYx9Rb9OYfSf7Ej4J VS7msfjhWcdH5yDIJsX+I8Sbe+9c8/nz8Xmk6NWLLqXrfYY0fgtHPHhtmv/1esPy4ef3 MhfAZkOfYNmvvZsx58PtA33zB5m4WQhy7onvx7IEN5G84AXE42/9VyzVjuBX09/i5OcE ExeNu9jRcEs60zXVFzqtuepUWGcYC7ecslfNa1MSHzwbH5HRMnGKE00cgsGu+T055F8p gw== Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0b-002e3701.pphosted.com with ESMTP id 34hhn5b68e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 01 Nov 2020 14:42:53 +0000 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g9t5008.houston.hpe.com (Postfix) with ESMTP id F3C7A53; Sun, 1 Nov 2020 14:42:50 +0000 (UTC) Received: from rfwz62.ftc.rdlabs.hpecorp.net (rfwz62.americas.hpqcorp.net [10.33.237.8]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id 74F1949; Sun, 1 Nov 2020 14:42:49 +0000 (UTC) From: rwright@hpe.com To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, daniel@ffwll.ch, sumit.semwal@linaro.org, christian.koenig@amd.com, hdegoede@redhat.com, wambui.karugax@gmail.com, chris@chris-wilson.co.uk, matthew.auld@intel.com, akeem.g.abodunrin@intel.com, prathap.kumar.valsan@intel.com, mika.kuoppala@linux.intel.com, rwright@hpe.com Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v3 0/3] Reduce context clear batch size to avoid gpu hang Date: Sun, 1 Nov 2020 07:42:41 -0700 Message-Id: <20201101144244.10086-1-rwright@hpe.com> X-Mailer: git-send-email 2.17.1 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-01_05:2020-10-30,2020-11-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=915 suspectscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 phishscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011010120 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Wright For several months, I've been experiencing GPU hangs when starting Cinnamon on an HP Pavilion Mini 300-020 if I try to run an upstream kernel. I reported this recently in https://gitlab.freedesktop.org/drm/intel/-/issues/2413 where I have attached the requested evidence including the state collected from /sys/class/drm/card0/error and debug output from dmesg. I ran a bisect to find the problem, which indicates this is the troublesome commit: [47f8253d2b8947d79fd3196bf96c1959c0f25f20] drm/i915/gen7: Clear all EU/L3 residual contexts The nature of that commit suggested to me that reducing the batch size used in the context clear operation might help this relatively low-powered system to avoid the hang.... and it did! I simply forced this system to take the smaller batch length that is already used for non-Haswell systems. The first two versions of this patch were posted as RFC patches to the Intel-gfx list, implementing the same algorithmic change in function batch_get_defaults, but without employing a properly constructed quirk. I've now cleaned up the patch to employ a new QUIRK_RENDERCLEAR_REDUCED. The quirk is presently set only for the aforementioned HP Pavilion Mini 300-020. The patch now touches three files to define the quirk, set it, and then check for it in function batch_get_defaults. Randy Wright (3): drm/i915: Introduce quirk QUIRK_RENDERCLEAR_REDUCED drm/i915/display: Add function quirk_renderclear_reduced drm/i915/gt: Force reduced batch size if new QUIRK_RENDERCLEAR_REDUCED is set. drivers/gpu/drm/i915/display/intel_quirks.c | 13 +++++++++++++ drivers/gpu/drm/i915/gt/gen7_renderclear.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) -- 2.25.1