From patchwork Thu Jul 23 09:05:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 11680479 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92E8513A4 for ; Thu, 23 Jul 2020 09:06:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BD7D20656 for ; Thu, 23 Jul 2020 09:06:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q1+o0cAc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="Dh+hv/l6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BD7D20656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ZUkcBEgTYvsoWtsulJ+gekhG29CAa9IjBKM5aQ5Wy1Y=; b=q1+o0cAcmjbG+qz8TWqeMKVH8o JncEWx8oCYHgcRlg4r9EPAutajzeycdlogNGFE0G9Wz4YfaC2DK7CSI6ReV9v/B5ZvopS9JvLdO0z gBsAL63AAm4TgTh03Vz+g7NolYioHGY7rpagluQebFEdDl4GXERk8tJEpqciPlmNxqI6KT/HXh5Ap exslugIErMIqbHjJebfA7vpCX6qvIwP7IEm7nM4YuBuRBXZ0ro7HSE2N0gx8XYFmU6wTT4ACirlDM c8O2Em4TtZzOsfhUrC0Ngf1varFEwO9x5H/jw4xoyVFZXcooUB6E+UPV4fPesMZ39V/rhAf9Wig9I qYdg20ww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyXAt-000207-Sw; Thu, 23 Jul 2020 09:05:59 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyXAr-0001ys-EF for linux-amlogic@lists.infradead.org; Thu, 23 Jul 2020 09:05:58 +0000 Received: by mail-wm1-x344.google.com with SMTP id x5so3698096wmi.2 for ; Thu, 23 Jul 2020 02:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4YwVwYWTqndxCbsk2H38cWSsg3v3dA5HnwhfyPRdygY=; b=Dh+hv/l6NQ3KPAUwJ3pGLveCtOWhIrkufkmB1J+B6iIB43BdLXWcJxxEw2kn1aV+// 2JduwiOcZylMNxNHMcbMG9ZbOIEHlqKi3fhxPOpIxh10qbgq5XYcYr81SyFIWCdzFHd4 15yPWQewJKf/16Bt+3N4M4eDj6wXOH2/RBv+0qs8XhfvzmcTQR74kceTWo/9YQOhHdlF O7P8bR3q3iUqAML7xw5WsywjG3nrGqFPLPvCJ/RvXDzoddRmu6iIgmgrJk3xL3Lx9OL+ 3Vynunr/OK7U/oZLr+jaCT+zxs/+6mBxrJajTs7hC+4/Ls4HRMdvH9wOOkaPBsOIxr6a LgUA== 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=4YwVwYWTqndxCbsk2H38cWSsg3v3dA5HnwhfyPRdygY=; b=L66o3RWh/cFUj6P53NOZ+hGMw0Nko3qSNHQutSnx5JTXQXwWtxjBeV98lTCu/Jj6pa YpJ0XuZJtOcRSTTyB1dcA2aq8Oo7bI4Of34ymYMf06rCjC6wT6zOg9ZGJNFvPPh5rKKz oSSSnwmK/MgBodFHP1evXCzqkGH++am/CzskhVdJXV+9RaUX3jxe26891Ole1nd9kWGf uMdAV+I+UbaCRakdvbSehNnIYe2+ShVwgGCPiv93LXo5I7Dvx4zhMfCjgKg/I4u1vbE0 p1RFep+99H6Pw8bC7g0LivZj+mLgWWHydNjTkuT346OoZXO7mVftEeOvqMa75fxAf4kl k4/w== X-Gm-Message-State: AOAM530qQ4DlvSseo1GNW9Zbx4h0p64w7uuoJ3t+WF0ygWvE8EMhwRCi oj11XZR0VJWQS7WOgfSsn9ptCw== X-Google-Smtp-Source: ABdhPJzM4ikkmRW1tN1fO+N5OIpr1/NNankXN3WMB2rYpcK0NBtOI2uo45JomMLql69t8i0N0TZePQ== X-Received: by 2002:a1c:4c16:: with SMTP id z22mr3176646wmf.103.1595495155216; Thu, 23 Jul 2020 02:05:55 -0700 (PDT) Received: from bender.baylibre.local ([2a01:e35:2ec0:82b0:5ce9:901f:7444:d44d]) by smtp.gmail.com with ESMTPSA id 62sm2947397wrq.31.2020.07.23.02.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 02:05:54 -0700 (PDT) From: Neil Armstrong To: daniel@ffwll.ch Subject: [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro Date: Thu, 23 Jul 2020 11:05:50 +0200 Message-Id: <20200723090551.27529-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200723_050557_583929_23FDF3CC X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: khilman@baylibre.com, Neil Armstrong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org Fix the Amlogic Video Framebuffer Compression modifier macro to correctly add the layout options, a pair of parenthesis was missing. Fixes: d6528ec88309 ("drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression") Signed-off-by: Neil Armstrong Acked-by: Sam Ravnborg --- include/uapi/drm/drm_fourcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index 4bee7de5f306..82f327801267 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -1004,7 +1004,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) #define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \ fourcc_mod_code(AMLOGIC, \ ((__layout) & __fourcc_mod_amlogic_layout_mask) | \ - ((__options) & __fourcc_mod_amlogic_options_mask \ + (((__options) & __fourcc_mod_amlogic_options_mask) \ << __fourcc_mod_amlogic_options_shift)) /* Amlogic FBC Layouts */ From patchwork Thu Jul 23 09:05:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 11680477 X-Patchwork-Delegate: neil.armstrong@linaro.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3ACED13B1 for ; Thu, 23 Jul 2020 09:06:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11CC820656 for ; Thu, 23 Jul 2020 09:06:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="X3ae7EZ+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="dp4NOUJq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11CC820656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dhGsPgRmiofWpNucJLL5OE7UgDwMVo7CWzLMx4KfLfk=; b=X3ae7EZ+p43Q3/xS57oSjmZ55 faD287kgoq7UMPW0MzYPAXch1KbNYFU/mV3jZbRorYaTSicPfFjmZN5vWeEXq7L1bDVI/sheLE8Vn +9kXVsfwJiZ5gDAtUnLHvTN3jzVPlSPjlntKI6UQmdtyHxru31lkCMf7OOk0yTLBZO8Mv7bW4GU8O VTuHkEBJhO2O8CtHErZt8F2LxYbZEQ6MUMrz2PUjJmjztEEjDz46vglA7mqHYVfPTefHyvraGU5br H7qViI8DPII8sJjJMBfugV0w6RjALGm+FaaXSxtetAI3Fz34B+UoxbuYHisnvds7wyvY/baw69Vva 4MlMF5KOQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyXAv-00020n-Dv; Thu, 23 Jul 2020 09:06:01 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyXAr-0001z1-SP for linux-amlogic@lists.infradead.org; Thu, 23 Jul 2020 09:05:59 +0000 Received: by mail-wr1-x442.google.com with SMTP id f1so3849400wro.2 for ; Thu, 23 Jul 2020 02:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LreLnnZrmwYYHqpYhGckfxJZdjPdivebpamaHVtnHss=; b=dp4NOUJqQL/scm6GUYDjAXuLDt4cgSIbswqtZ6cIJfZCxfzC1NpMAwaIZ+2dvElcj9 SDC0T7IQ44exhyDpzJ9m7bbXA8SelqJO/TmmnZPQfFDK63km9fcYn7YvPWQPd4zttNZm DgWrxRl6zwWKV+SF2Dezay6uB7J+zAzzIPC7iRSeLSi9hP4VzjDj2CYgg7Y9mSk1PDhz A52xl0Ki7OzQ5at/zyyUJtmVloPz8Vqhq2ZgYD6xs3fo1wUAWRJNN6adh8xK05051VJA f8qrpe2alI3fnTVS4Nrfn641a/3JssxJhg5jEeT8FUwJs2HZAvWCnrUvgjhoOUId9/CY j47A== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=LreLnnZrmwYYHqpYhGckfxJZdjPdivebpamaHVtnHss=; b=F26ApGJ+uAS/QuhxVQuTJl4nwigTh0O7ZzPzBFYfEPd3yfS7Pgx4gCqTN27f6CNy7b yA6ZRihxD3+WjjaeIbw7vpYEWTMqPdfExl3o7Sn952wM5xE95LgOd/+daStH7bEUYDZp grk2tJ/93pCn5hwZ/1qgjrA4fYGAqJo3+SMCOSRNLlgaJhVL48+HK0tORpd8vvElebDC xAjXTK6IyaQlurlUlS1f8dvvP1tjLs8PYO+z5ZeoMRGTLJMTlDXSJVmdr+2IDN0JwalG k9+0f8YcJbPl623xcucChcUsI8fphf9mXVa4AAe2xd6il5ahitD5FqOxSpkJ+sPJdcoU irUg== X-Gm-Message-State: AOAM533vFRL5w51TNyBq1J0K1FURYeMIqfP/9HYt7YZnHOySw1O/M0n2 M1xVBNcsLTC85R4MDFr7ep/opA== X-Google-Smtp-Source: ABdhPJzqffe9YMOSst9S78aI/iVWmungmYo/9CY48wTFHegSvIqIB1PAqtLGwVADRl5r9zYcZipJCA== X-Received: by 2002:adf:ec8b:: with SMTP id z11mr3032026wrn.51.1595495156669; Thu, 23 Jul 2020 02:05:56 -0700 (PDT) Received: from bender.baylibre.local ([2a01:e35:2ec0:82b0:5ce9:901f:7444:d44d]) by smtp.gmail.com with ESMTPSA id 62sm2947397wrq.31.2020.07.23.02.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 02:05:56 -0700 (PDT) From: Neil Armstrong To: daniel@ffwll.ch Subject: [PATCH 2/2] drm/meson: overlay: fix Amlogic Compressed Framebuffer modifier layout extract Date: Thu, 23 Jul 2020 11:05:51 +0200 Message-Id: <20200723090551.27529-2-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20200723090551.27529-1-narmstrong@baylibre.com> References: <20200723090551.27529-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200723_050558_044032_D837D0A8 X-CRM114-Status: GOOD ( 10.24 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: khilman@baylibre.com, Neil Armstrong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The bitwise operation worked because the result is casted in a lower bits integer, and was not changed after the modifier defines rework. Use the correct operation as already used in meson_overlay_atomic_update(). Fixes: e860785d5730 ("drm/meson: overlay: setup overlay for Amlogic FBC") Signed-off-by: Neil Armstrong --- drivers/gpu/drm/meson/meson_overlay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c index a8bcc70644df..83ec613bbfb6 100644 --- a/drivers/gpu/drm/meson/meson_overlay.c +++ b/drivers/gpu/drm/meson/meson_overlay.c @@ -756,8 +756,7 @@ static bool meson_overlay_format_mod_supported(struct drm_plane *plane, if ((modifier & DRM_FORMAT_MOD_AMLOGIC_FBC(0, 0)) == DRM_FORMAT_MOD_AMLOGIC_FBC(0, 0)) { unsigned int layout = modifier & - DRM_FORMAT_MOD_AMLOGIC_FBC( - __fourcc_mod_amlogic_layout_mask, 0); + __fourcc_mod_amlogic_layout_mask; unsigned int options = (modifier >> __fourcc_mod_amlogic_options_shift) & __fourcc_mod_amlogic_options_mask;