From patchwork Tue May 10 18:33:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 12845430 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F05A5C433F5 for ; Tue, 10 May 2022 18:33:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C130410E038; Tue, 10 May 2022 18:33:31 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id E765310E021; Tue, 10 May 2022 18:33:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652207610; x=1683743610; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oSEps9+R5JXIZfNwbKYkU7jEWQUHQly7GLLllzOm8Ro=; b=CumC8qlirZ4Wcu4yXzUeBQuZ07FHnSGJk62xR979fSIzRpYCrOlsE3fw C7nxlS2bwloSpgGloa0TVglmuWj7N1faXRFvD8adSql3d0ocOnz5mCpWc b7VKk+GDvEgddGRYVqsXB4+OGuzFpg+/BEapMW3RYo8OGto+Qg318+HD2 ER/jfGyfFqpWaTJ38qeyZWonJ35rsz0jgv5/qTKqdL0G+Kz4A4KdE5QNU 5YXi/wOAio6UQzWJ8KxAruub8pD1kyItDqg1kkEbow/ndcEtQ6HA8Gx+p 0tALxYLaWvu/Ae1lU8cAposKwESyEiLDXAL7uoaJ3F1VTTr5KbCQ0f+Cc g==; X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="267058471" X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="267058471" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 11:33:29 -0700 X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="593673554" Received: from lengdahl-mobl.ger.corp.intel.com (HELO jhogande-mobl1.ger.corp.intel.com) ([10.251.220.119]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 11:33:26 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Date: Tue, 10 May 2022 21:33:10 +0300 Message-Id: <20220510183313.1046628-1-jouni.hogander@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v3 0/3] Fixes for selective fetch area calculation X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Pearson , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Currently selective fetch area calculation ends up as bogus area in at least following cases: 1. Updated plane is partially or fully outside pipe area 2. Big fb with only part of memory area used for plane These end up as y1 = 0, y2 = 4 or y2 being outside pipe area. This patch set addresses these by ensuring update area is within pipe area or by falling back to full update. Patch set also adds drm_dbg_once* macros to print out debug message only once. drm_dbg_once_kms is used to printout debug message when selective fetch area calculation fails. v3: - Add drm_dbg_once* and use it when sel fetch area calculation fails - Move drm_rect_intersect to clip_area_update v2: - Update commit message of first patch - Set damaged_area x1 and x2 during initialization Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Jouni Högander (3): drm/print: Add drm_debug_once* macros drm/i915/psr: Use full update In case of area calculation fails drm/i915: Ensure damage clip area is within pipe area drivers/gpu/drm/i915/display/intel_psr.c | 36 +++++++++++++++++++----- include/drm/drm_print.h | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+), 7 deletions(-)