From patchwork Mon Jan 9 10:58:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ma=C3=ADra_Canal?= X-Patchwork-Id: 13093280 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 DA9D9C54EBD for ; Mon, 9 Jan 2023 11:01:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A20C10E3D7; Mon, 9 Jan 2023 11:01:02 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F87D10E3D9; Mon, 9 Jan 2023 11:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Vf959UezHF2Cel3AL88HjjvfaoBXBtvA5RmAJ1bMWl4=; b=BKx99E2Ufl5aAxjfNkjN4lC5ir seuES+8BGKih1XrmJTveKMZ97TlJRLJ6dE4IHEomfeFovOdiSvUGclXV/qKYOHq7I3TiX8rs14chE +OdfJt6tUUUSTlg26fapAD/9ZHDYj9HZyCoslAonetE3OBVq4F4E23Wyb7VtXfdFEuuewA/NlXsfM X2cRDCtKy9biCtgTClP0hQV3FBca8StE3ZDgg7ph0LNBrvfHAdSwh08rNpn4FY25Hw/bvvBtuQgJF 9cTlbwzTr/fqPlfinB7c7MUdN4SftUjkyWLvMrL+fxLp/l5zbfhLgcKTSR8Dtkuh0BWos+K61pAl9 tKRHMz6w==; Received: from [187.36.234.139] (helo=bowie..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1pEptR-003J8T-3v; Mon, 09 Jan 2023 12:00:41 +0100 From: =?utf-8?q?Ma=C3=ADra_Canal?= To: Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Clark , Simon Ser , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Zack Rusin Date: Mon, 9 Jan 2023 07:58:06 -0300 Message-Id: <20230109105807.18172-4-mcanal@igalia.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230109105807.18172-1-mcanal@igalia.com> References: <20230109105807.18172-1-mcanal@igalia.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 3/5] drm/i915: Remove redundant framebuffer format check 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: =?utf-8?q?Andr=C3=A9_Almeida?= , intel-gfx@lists.freedesktop.org, =?utf-8?q?Ma=C3=ADra_Canal?= , dri-devel@lists.freedesktop.org, Melissa Wen , VMware Graphics Reviewers Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Now that framebuffer_check() verifies that the format is properly supported, there is no need to check it again on i915's inside helpers. Therefore, remove the redundant framebuffer format check from the intel_framebuffer_init() function, letting framebuffer_check() perform the framebuffer validation. Signed-off-by: MaĆ­ra Canal Reviewed-by: Simon Ser --- drivers/gpu/drm/i915/display/intel_fb.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c index 63137ae5ab21..230b729e42d6 100644 --- a/drivers/gpu/drm/i915/display/intel_fb.c +++ b/drivers/gpu/drm/i915/display/intel_fb.c @@ -1914,15 +1914,6 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb, } } - if (!drm_any_plane_has_format(&dev_priv->drm, - mode_cmd->pixel_format, - mode_cmd->modifier[0])) { - drm_dbg_kms(&dev_priv->drm, - "unsupported pixel format %p4cc / modifier 0x%llx\n", - &mode_cmd->pixel_format, mode_cmd->modifier[0]); - goto err; - } - /* * gen2/3 display engine uses the fence if present, * so the tiling mode must match the fb modifier exactly.