From patchwork Sun Feb 24 15:34:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10828331 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C857E1805 for ; Mon, 25 Feb 2019 08:34:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8D702A93B for ; Mon, 25 Feb 2019 08:34:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD57A2AB83; Mon, 25 Feb 2019 08:34:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B0782A93B for ; Mon, 25 Feb 2019 08:34:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA28389242; Mon, 25 Feb 2019 08:34:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F93289760 for ; Sun, 24 Feb 2019 15:34:46 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id q12so5064193lfm.0 for ; Sun, 24 Feb 2019 07:34:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MCiOM8z5yHs6ziH/t2CxnPow0VQL7UWCL+qFAhR9opY=; b=FaqbxgB4hxldwlZpddfDCncGYQUSN1lpFRL+FBfcuMYr/MmW/tMkTYAsLw3a9YIPX3 k0pAjlTwh+1gVKqny3Lu7iEUmUgAc6B75Bde3rKOtm6dGSj3mvBToXGspRJ3ZrmU3kwN lZNm+ENMeo1gwBFnKiTaiadyMs2bSXGhuxvgZ4BybohsQvykpJ9r1OEZcpXsmceDsVgR S/mguiCzBza/v1BBIyzWD+OLu3rUfCKsvqEy+hvBEtKFGIamG0gNSXB4p9pQUZnqJh/j 2kAUxUJHfRKDlqq70Xj7IV9CgpXA5ZZxxNcKIu2C+tQDrh+ybR7Re8fXDRwwZGrJuVPk KgJg== X-Gm-Message-State: AHQUAuaa07vvp5GyUMN5491Vkye/j/DxwcXyQdGOY1oUihBYxuCa6bey 2RkunnbV4xBv8CqAjbCsx+c= X-Google-Smtp-Source: AHgI3IZkaposEfdZSCZUX2HGWAxmZiOYETDipZyCQTlB2gzMfaYpUCpf4IqpIQRE2bc0J7zjz2kiKg== X-Received: by 2002:a19:7b0e:: with SMTP id w14mr7953982lfc.8.1551022484799; Sun, 24 Feb 2019 07:34:44 -0800 (PST) Received: from localhost.localdomain (ppp91-79-175-49.pppoe.mtu-net.ru. [91.79.175.49]) by smtp.gmail.com with ESMTPSA id c190sm1145744lfg.84.2019.02.24.07.34.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Feb 2019 07:34:44 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding Subject: [PATCH v1] drm/tegra: plane: Remove format-modifier checking Date: Sun, 24 Feb 2019 18:34:05 +0300 Message-Id: <20190224153405.8447-1-digetx@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 25 Feb 2019 08:34:29 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MCiOM8z5yHs6ziH/t2CxnPow0VQL7UWCL+qFAhR9opY=; b=iWHhyDGmDCUZFWPJoZ+KzoWjKOUTFvuqXrnq30jrhNllLimLWAtc5esDY73OsJ+Lc3 5BVY6a9/4pndnoUQin5gWRCM9oPY7bnqr7rxidlqc/KK9NQ9yR76XmigFAUxLbTxaNCm uzwwZNHywnTbxE2IlClJGhHKZJsjHdNhhjY6ARCfcDIZFWcCiVGEYOtT1f6E57I84p6C DzHUR8wDhzcnO6yJZTMs+mRAe1o8xpqt39vgRcaMbjn/wIA5hGt7xVIPeCfPdMs1lAyT peHNzKJasG7R6NgPWxybB3omPrl9c1v8HLornXZk0mIKs4nrvDpmNzuOP1JOcks8322k 1i/w== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Tiling modifier can't be applied to YV12 video overlay because all tiling modifiers are filtered out for multi-plane formats. AFAIK, all modifiers should work with all of formats, hence the checking is incorrect and simply not needed. Fixes: e90124cb46bdb ("drm/tegra: plane: Support format modifiers") Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/plane.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index d068e8aa3553..5a8a3387f5ee 100644 --- a/drivers/gpu/drm/tegra/plane.c +++ b/drivers/gpu/drm/tegra/plane.c @@ -72,21 +72,6 @@ static void tegra_plane_atomic_destroy_state(struct drm_plane *plane, kfree(state); } -static bool tegra_plane_format_mod_supported(struct drm_plane *plane, - uint32_t format, - uint64_t modifier) -{ - const struct drm_format_info *info = drm_format_info(format); - - if (modifier == DRM_FORMAT_MOD_LINEAR) - return true; - - if (info->num_planes == 1) - return true; - - return false; -} - const struct drm_plane_funcs tegra_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, @@ -94,7 +79,6 @@ const struct drm_plane_funcs tegra_plane_funcs = { .reset = tegra_plane_reset, .atomic_duplicate_state = tegra_plane_atomic_duplicate_state, .atomic_destroy_state = tegra_plane_atomic_destroy_state, - .format_mod_supported = tegra_plane_format_mod_supported, }; int tegra_plane_state_add(struct tegra_plane *plane,