Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp710698pxv; Thu, 15 Jul 2021 14:08:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6kbocI+PhEu9xRN8uvimJLstRolDVpwYALUnD5QQM4TphnCABRRH/6Of7TzsQSsHxFNI8 X-Received: by 2002:a50:8d54:: with SMTP id t20mr9614116edt.288.1626383292843; Thu, 15 Jul 2021 14:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383292; cv=none; d=google.com; s=arc-20160816; b=T/2sGs6FiH57zsSdsHYZKiiI2fQ4+0ye+oFRj/A3kIe+0CKqkH50CyTznYku2acdLi qc/AhXkWEF0gQOQl/uz7JCQLeCsVB/esZ1diUZA5H10mqyi/weSJDIEfr1DocOi0uM/G v4AZmKLwxYBVRPAHMXgHibq2PW89gPVA8B076bRzPby8mX8MVysktsJ0yPYnobZE5LXF PpeOhh+GW/xPOdKe6vOI1cGMH5ey0fQcepOBcFG1KziFghY+TxkD7OX9v7CZ2dOQuqKM o89Eo+H/G1r57U8POvUzaqapL4M6IS0kveRf+Yy/Ya6mBYYSca0IW/HgI3PTl7sDbvJw 7dJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CQq/8OvDqzBpadRaaeB9dztzl7gbsNbz62acdSEx++M=; b=nrvX4KxsoMpl+wqVolpsgSKdjj9Qyzh3IlgpStpYAnNpt5LJnJ1ZNRubKxmdHaoXcj cbKoj3Vx+xH9pBVS6NzJzQiTYGOYG1erMCSc6q9xUZvZvHxOiai0gdUzpHU2sj2nLuL1 uMLqz0wh6MP3f+jsdIukXtcDlF4QjSMNFgEBAeB4sxeJ8YluKq19lsIV7EOoQ+S4WEu/ DEkW5REaD4a+Z8NVJC9F1xACWHdTpIqFMzapQZr+wJ3rTyoPuypi4KdqxmJnLBnfKf65 khn3k6jLJxATrqJUPaQjeNdWr6EBvXQtbEnwg1aFWlE1FbJqmt67HJWSIkh/pWY1xXMf ho6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oveI0Kf6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si8392869ejk.196.2021.07.15.14.07.49; Thu, 15 Jul 2021 14:08:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oveI0Kf6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245390AbhGOTTl (ORCPT + 99 others); Thu, 15 Jul 2021 15:19:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:38802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240256AbhGOTEl (ORCPT ); Thu, 15 Jul 2021 15:04:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EB8D3613E5; Thu, 15 Jul 2021 19:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375647; bh=E1rfawRYE3YC1A6vcqcfifcrxN/c0o1AcCscCPZDZlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oveI0Kf6iCURMd53xdRXi3aYfAePiLcV1EGArviCTdBAI4GJXVb5wZRH6A7+P94mv fX3zTkUPKVHsOe9hou5B2ojqDj4TsS/Ir+3UfBAHzSfg3hyd9W7NtWO/1MWqivkBxm 73uDTog3qagLh+44SbvTuskfAO9nbIHgBjkPmICU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pekka Paalanen , Thierry Reding , Daniel Vetter , Thierry Reding , Jonathan Hunter , linux-tegra@vger.kernel.org Subject: [PATCH 5.12 177/242] drm/tegra: Dont set allow_fb_modifiers explicitly Date: Thu, 15 Jul 2021 20:38:59 +0200 Message-Id: <20210715182624.391118308@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Vetter commit be4306ad928fcf736cbe2616b6dd19d91f1bc083 upstream. Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. It was slightly inconsistently though, since planes with only linear modifier support haven't listed that explicitly. Fix that, and cc: stable to allow userspace to rely on this. Again don't backport further than where Paul's patch got added. Cc: stable@vger.kernel.org # v5.1 + Cc: Pekka Paalanen Acked-by: Thierry Reding Signed-off-by: Daniel Vetter Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210413094904.3736372-10-daniel.vetter@ffwll.ch Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/tegra/dc.c | 10 ++++++++-- drivers/gpu/drm/tegra/drm.c | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -947,6 +947,11 @@ static const struct drm_plane_helper_fun .atomic_disable = tegra_cursor_atomic_disable, }; +static const uint64_t linear_modifiers[] = { + DRM_FORMAT_MOD_LINEAR, + DRM_FORMAT_MOD_INVALID +}; + static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm, struct tegra_dc *dc) { @@ -975,7 +980,7 @@ static struct drm_plane *tegra_dc_cursor err = drm_universal_plane_init(drm, &plane->base, possible_crtcs, &tegra_plane_funcs, formats, - num_formats, NULL, + num_formats, linear_modifiers, DRM_PLANE_TYPE_CURSOR, NULL); if (err < 0) { kfree(plane); @@ -1094,7 +1099,8 @@ static struct drm_plane *tegra_dc_overla err = drm_universal_plane_init(drm, &plane->base, possible_crtcs, &tegra_plane_funcs, formats, - num_formats, NULL, type, NULL); + num_formats, linear_modifiers, + type, NULL); if (err < 0) { kfree(plane); return ERR_PTR(err); --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -1122,8 +1122,6 @@ static int host1x_drm_probe(struct host1 drm->mode_config.max_width = 4096; drm->mode_config.max_height = 4096; - drm->mode_config.allow_fb_modifiers = true; - drm->mode_config.normalize_zpos = true; drm->mode_config.funcs = &tegra_drm_mode_config_funcs;