From patchwork Mon Jan 8 12:39:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10149355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EEC26601A1 for ; Mon, 8 Jan 2018 12:39:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2A3A2856E for ; Mon, 8 Jan 2018 12:39:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5E03285FB; Mon, 8 Jan 2018 12:39:51 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 263082856E for ; Mon, 8 Jan 2018 12:39:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B550D6E5DB; Mon, 8 Jan 2018 12:39:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 173026E5DB for ; Mon, 8 Jan 2018 12:39:48 +0000 (UTC) Received: by mail-qt0-x243.google.com with SMTP id 33so13381794qtv.1 for ; Mon, 08 Jan 2018 04:39:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vGiT2FdtO+0CLVjVrfU6kGn1fdnNSWZ+PE3rVi2MIsw=; b=BEBnAdjOAwHR7opNzOZzxzjkmRmvxn/9FDXmvjGC579oric6XTbTSea11+lhJ+a9t6 dPqJ+WJU9mfTnECPHBZdizfscgTbaGkUdhN7DX3zGeA9I2FSQPJtdM+Uj/35/cYCuk7n mRACcI6YQlU3hHDTgNWT/MpFG5mMgk4B7M7ArvpkIhXzVxOIMXeMLqB/tjIo/wISG96d xHwdRQS+k9Zrw7LQ84vW5AM3IUgLCnT+3I2nWfvNqElQS+37stR5syTfJfqZt23Ou5nI 0hOu74PyXyAkRiwZ68co1ZH7dqb7L8uAnoD1siFp7MwM0o0h4NXHcm01XtBcJdEOCiU3 ez4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vGiT2FdtO+0CLVjVrfU6kGn1fdnNSWZ+PE3rVi2MIsw=; b=PK0ZVSMsxmCdAytilvt/dazLKEvSVkbfmXI7reqE6zZ+wV3jJGOsV3GIZLCudi8l3T GpA1KDGu1TbYjQ4C02AiMHpdeFC0jn13Bexm4yViAbrTfvcdhRhOnhjiPAUuVmS+i2Gt w/9rFprz+Gs2yKs/kr7FN43zfQXSNW4D0zKamEUcSHK15UaMjQkS8sSEIzFG9m5XIj9Z cTElO/rcx532CYmasfEwzTBv2XcJVSwT+N21J/xcGmscr7YZZ9rMah+bp5mj3QQimpHM so5Qn14pO+WTLfrM7t+GsNi1+e+aIc/baFoHDHECoAn0AlICupwZ16KFGTFPxOgn6lMG p1cw== X-Gm-Message-State: AKwxytcqr5LCNbVGSmwzS9j1YTnWU9elAgzTwaZ/56nBQTmWqXMc3V3A kxvqKZvYD3x//PaHgWcF0K8= X-Google-Smtp-Source: ACJfBotZBtfb9xozzdA5qisuv7yHb70y26olOVBmJ4oKjgZUp6OQIdSQriuOScWeyC++5FnDvw7UbA== X-Received: by 10.200.4.13 with SMTP id v13mr15094977qtg.153.1515415187005; Mon, 08 Jan 2018 04:39:47 -0800 (PST) Received: from localhost (p200300E41F1A2D00C4E4B29839822A7C.dip0.t-ipconnect.de. [2003:e4:1f1a:2d00:c4e4:b298:3982:2a7c]) by smtp.gmail.com with ESMTPSA id n64sm7618783qkf.49.2018.01.08.04.39.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jan 2018 04:39:46 -0800 (PST) Date: Mon, 8 Jan 2018 13:39:43 +0100 From: Thierry Reding To: Dmitry Osipenko Subject: Re: [GIT PULL] drm/tegra: Changes for v4.16-rc1 Message-ID: <20180108123943.GA13522@ulmo> References: <20180105141726.29713-1-thierry.reding@gmail.com> <558f572b-8174-c8ee-3ff8-79e591c0648d@gmail.com> <20180108074250.GA10590@ulmo> MIME-Version: 1.0 In-Reply-To: <20180108074250.GA10590@ulmo> User-Agent: Mutt/1.9.1 (2017-09-22) Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jan 08, 2018 at 08:42:50AM +0100, Thierry Reding wrote: > On Fri, Jan 05, 2018 at 05:58:17PM +0300, Dmitry Osipenko wrote: > > On 05.01.2018 17:17, Thierry Reding wrote: > > > Hi Dave, > > > > > > The following changes since commit 9428088c90b6f7d5edd2a1b0d742c75339b36f6e: > > > > > > drm/qxl: reapply cursor after resetting primary (2017-12-08 13:37:02 +1000) > > > > > > are available in the Git repository at: > > > > > > git://anongit.freedesktop.org/tegra/linux tags/drm/tegra/for-4.16-rc1 > > > > > > for you to fetch changes up to ebae8d07435ae91314f4a28d69b530d09c625815: > > > > > > drm/tegra: dc: Implement legacy blending (2017-12-21 14:55:55 +0100) > > > > > > Thanks, > > > Thierry > > > > > > ---------------------------------------------------------------- > > > drm/tegra: Changes for v4.16-rc1 > > > > > > The bulk of these changes are preparation work and addition of support > > > for Tegra186. Currently only HDMI output (the primary output on Jetson > > > TX2) is supported, but the hardware is also capable of doing DSI and > > > DisplayPort. > > > > > > Tegra DRM now also uses the atomic commit helpers instead of the open- > > > coded variant that was only doing half its job. As a bit of a byproduct > > > of the Tegra186 support the driver also gained HDMI 2.0 as well as zpos > > > property support. > > > > > > Along the way there are also a few patches to clean up a few things and > > > fix minor issues. > > > > > > ---------------------------------------------------------------- > > > Arnd Bergmann (2): > > > drm/tegra: Mark Tegra186 display hub PM functions __maybe_unused > > > drm/tegra: Fix non-debugfs builds > > > > > > Dmitry Osipenko (3): > > > drm/tegra: dc: Link DC1 to DC0 on Tegra20 > > > drm/tegra: gem: Correct iommu_map_sg() error checking > > > drm/tegra: Correct timeout in tegra_syncpt_wait > > > > > > Thierry Reding (43): > > > drm/fourcc: Fix fourcc_mod_code() definition > > > drm/tegra: Sanitize format modifiers > > > gpu: host1x: Rewrite conditional for better readability > > > gpu: host1x: Cleanup on initialization failure > > > dt-bindings: display: tegra: Update SOR for Tegra186 > > > drm/tegra: dc: Move register definitions into a table > > > drm/tegra: dsi: Move register definitions into a table > > > drm/tegra: hdmi: Move register definitions into a table > > > drm/tegra: sor: Move register definitions into a table > > > drm/tegra: dc: Reshuffle some code > > > drm/tegra: dc: Register debugfs in ->late_register() > > > drm/tegra: dsi: Register debugfs in ->late_register() > > > drm/tegra: hdmi: Register debugfs in ->late_register() > > > drm/tegra: sor: Root debugfs files at the connector > > > drm/tegra: sor: Register debugfs in ->late_register() > > > drm/tegra: Do not wrap lines unnecessarily > > > drm/tegra: vic: Properly align arguments > > > drm/tegra: dc: Support background color > > > drm/tegra: Use atomic commit helpers > > > drm/tegra: Remove custom page-flip handler > > > drm/tegra: dc: Remove tegra_primary_plane_destroy() > > > drm/tegra: dc: Remove duplicate plane funcs > > > drm/tegra: dc: Remove tegra_overlay_plane_destroy() > > > drm/tegra: dc: Remove duplicate plane funcs > > > drm/tegra: dc: Move state definition to header > > > drm/tegra: Move common plane code to separate file > > > drm/tegra: Add Tegra186 display hub support > > > drm/tegra: dc: Add Tegra186 support > > > drm/tegra: Support ARGB and ABGR formats > > > drm/tegra: sor: Parameterize register offsets > > > drm/tegra: sor: Add Tegra186 support > > > drm/tegra: sor: Support HDMI 2.0 modes > > > drm/tegra: dpaux: Implement runtime PM > > > drm/tegra: dpaux: Add Tegra186 support > > > drm/tegra: fb: Force alpha formats > > > drm/tegra: dc: Support more formats > > > drm/tegra: dc: Use direct offset to plane registers > > > drm/tegra: dc: Remove redundant spinlock > > > drm/tegra: Implement zpos property > > > gpu: host1x: Use IOMMU groups > > > drm/tegra: Use IOMMU groups > > > drm/tegra: dpaux: Keep reset defaults for hybrid pad parameters > > > > > > > drm/tegra: dc: Implement legacy blending > > > > Please hold on this patch. First of all it doesn't work correctly, see my last > > reply to the patch. Secondly, it introduces bug that breaks YUV plane. > > I thought we had already concluded that this version doesn't cause any > regressions. And since this is new functionality I'm not too worried if > it doesn't work in all cases, we've got plenty of time to fix those up. > > As for the YUV plane bug, can you point me at a test case, or describe > what exactly you're trying to do so that I can reproduce and fix it? > > I'd like to make forward progress on this rather than hold back on > patches out of fear that they may break existing functionality. In order > to do that we need tests that can be run to validate existing > functionality. I think I was able to reproduce the bug you mentioned by running this on a TrimSlice: $ modetest -M tegra -s HDMI-A-1@34:1920x1080 -P 28@34:256x256+64+64@XR24 -P 30@34:256x256+384+64@UYVY This currently fails with the above patch, but I can fix it using the below diff. Essentially we treat YUV planes as opaque, but currently error out on YUV formats because they have no "alpha" equivalent. The fix is to simply return the same format. Can you see any more issues after applying this fix? I wasn't able to find a situation where it doesn't work. Thierry --- >8 --- diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index 154b4d337d0a..36a06a993698 100644 --- a/drivers/gpu/drm/tegra/plane.c +++ b/drivers/gpu/drm/tegra/plane.c @@ -276,6 +276,11 @@ bool tegra_plane_format_has_alpha(unsigned int format) int tegra_plane_format_get_alpha(unsigned int opaque, unsigned int *alpha) { + if (tegra_plane_format_is_yuv(opaque, NULL)) { + *alpha = opaque; + return 0; + } + switch (opaque) { case WIN_COLOR_DEPTH_B5G5R5X1: *alpha = WIN_COLOR_DEPTH_B5G5R5A1;