Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp657861pxv; Thu, 15 Jul 2021 12:41:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZN5oiFdhNffYjT7gof1Bz0QYT8Bis38Ap/bSXL7FYpcqqLcVso7Evw+G9N7Y/Bg2ArOZb X-Received: by 2002:aa7:cb0e:: with SMTP id s14mr9361316edt.141.1626378069527; Thu, 15 Jul 2021 12:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378069; cv=none; d=google.com; s=arc-20160816; b=KNo7JbuMEdJUvXHuD7fcmo5yTXzc/+sU2yXLFxSCvYlB2RxdiyzVN/08POhRVjUQbM oYCUUBolaIUms3hYkqLTvkbX3T3F3+RhwPjdBs85KJhHZ2omTFLafnpZrSXyn3+WQWua KPFomkoz+2rsopb/nVi4Tg4+E2jInEB4JTadpvw+EVm+9EH/csnvbaBIb9gc/VIiomdZ ONxmerkqFp2k907xa6mpBfE3j5ecQ7f+15ngE/NmMN1M1zLw4tF0dYVyzSbYHEDJuHwh 8v9cDzW+KmXOgTZ47F8hAo9Qkh3Ua5mJm5a/NgXXjOtUf4IJgo0Kt2THlS8IcfKRxErD Jvqg== 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=I7TvxwVYcCDWU4o2Mu8tP5iddHlX0h8yaag55nYsk2g=; b=yBas2jJIx84d+voAPvEohKAJgXZZNbKsHzIF9THIXa3TSWZiBOSN2Yab9C9dkMPbXU pmKzXjLRm5HRGNsI52A1g7KVU7wT5KdfF24ewBcPxLro+q4+bo4QqZRtmS1zcFD0Shpg jnNn/EkbusOMe+3ncX/qfPZeF7xIYE7l0dwoc1w1mArOnq7JkyxidM0jwVPyYf1AM5IF QhC9XbuOakQkktzLN3+7lGCfT0Re+bmlvjn/sbAtKvNFJzthFiZ+NvWJi2ipCndV5LDf CPSzD+u4PZw3rNr5jkwULSdOBqV5er7xtG+JADdEJDzLVMKoc9WeAenaHb07eFZkVsal 9EHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gVU5XToC; 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 h93si9752031edd.134.2021.07.15.12.40.47; Thu, 15 Jul 2021 12:41:09 -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=gVU5XToC; 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 S1343886AbhGOTmj (ORCPT + 99 others); Thu, 15 Jul 2021 15:42:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:50730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244763AbhGOTPO (ORCPT ); Thu, 15 Jul 2021 15:15:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 019D66141C; Thu, 15 Jul 2021 19:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376278; bh=Pi3SmP6rNxgRgWzCKdrqpUvK9hb/g61I4pJGz9oPqgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gVU5XToCAhIq4sARu6KWNV9xRr7DFrQuQ1cAxtGh7n3jqiiT9lgPDgAnvOM82fooZ CxPv0/3YeJSBiBxLgG2JsdXGs7pbUCEKmOWJ16YqHpRCrLu8VPirriXy52HYv3J/Fg MWa7jf99KVDLUecFMWed6eithsi3BQ5YSEPhjuao= 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.13 201/266] drm/tegra: Dont set allow_fb_modifiers explicitly Date: Thu, 15 Jul 2021 20:39:16 +0200 Message-Id: <20210715182645.713987940@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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 @@ -999,6 +999,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) { @@ -1032,7 +1037,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); @@ -1151,7 +1156,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 @@ -1124,8 +1124,6 @@ static int host1x_drm_probe(struct host1 drm->mode_config.max_width = 0; drm->mode_config.max_height = 0; - drm->mode_config.allow_fb_modifiers = true; - drm->mode_config.normalize_zpos = true; drm->mode_config.funcs = &tegra_drm_mode_config_funcs;