Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp632763pxv; Thu, 15 Jul 2021 12:02:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7wN4iuUr/k04AwUTI7ZvcYMFFw7OfzloLre9+NSFSebiDMhfHA1jStCQgo2peh6Krrm4b X-Received: by 2002:a92:a806:: with SMTP id o6mr3780526ilh.53.1626375743186; Thu, 15 Jul 2021 12:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375743; cv=none; d=google.com; s=arc-20160816; b=M/EKo09indmmQ9IKvXAopsNTOlktK1ML/ZE0bMlDaeqBsR5GhsrLOmDxaYer6/5/GP 1UHnDr75GsGbi2o9hnYIRM8G0ApfwlQm1kkBFJXa85kcj8bg0FcVvvmnwQeMGUYBW10j jwLMfifisCnHeIUke+T5NjRNKsVvD95EcDIiJF/Shi5tge1Q34kwp9t78fG+LPWgbqzt brupQLTgGswhlViwX1SWB0NnHAT3YRxQJKHkB85CpJKqLdRHquJ8x1lv9KHTG3O/TcYh hmecX2+8vHBJO66+YWv31jHyS0NhG5Qw+IrRJ7wS2ApbnIqciqweaPdJQSgMWXc1Ipbl +3Mw== 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=hCRnL8WjNEXSqT9RBcE/5IHMybPyfxStLRjjQ4yzDpo=; b=hTJ9jEZ4chuwbKkRxA8Q4T8DitHYKuysOnwoGfdloWFe4JLL7TTlJ//uyAO3gTySz3 fmqqVNSnMH/WJqIjBCA4lXkcpmI56VrpKFj7YHxijhMSGtGAXqOwjq1UKNbVd/FOUiFV /rAu90hToyoIbfS330/Sf2b0HiDr3UqBL0HHXn5AGJYBfbFCeKfpyWjY/x92UwXMDAjS i8ij+F9udWHTwkeP9Eck11o/thDK6ogUi9/wY9cIFhVyVcAeEdOnspnMz+6085WJAgaD nGEbp/2n3H0uPFrSeL5uQQB0x1kcqBxqsQeTXSC44DC9hKAT9jzBdW3sPm7yKf0uAo3a ixwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j1OblpDd; 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 a1si1649076jat.32.2021.07.15.12.02.10; Thu, 15 Jul 2021 12:02:23 -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=j1OblpDd; 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 S242593AbhGOTCH (ORCPT + 99 others); Thu, 15 Jul 2021 15:02:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:58132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241729AbhGOSyg (ORCPT ); Thu, 15 Jul 2021 14:54:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A43F613CF; Thu, 15 Jul 2021 18:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375101; bh=tB9n9DecfNlZ8D3SRM40CXHbkxGOBPpWXf2po1dV+kg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j1OblpDdKfSJZHz2qNm7CUIIbXrkLWaMBbkgzX9g2iMtKL4X5wJ9HHrpdk3CSu2gt 5sSavOHNpsRMRM58WwN0qIZT9YHUV/VWdWjttsiOagE3qR4Ga4hiiUrDg+KYHBoht2 lzd0vG025CRJW4nJ0BQbat78JC5qneP+TC5YoEbo= 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.10 161/215] drm/tegra: Dont set allow_fb_modifiers explicitly Date: Thu, 15 Jul 2021 20:38:53 +0200 Message-Id: <20210715182627.992575303@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@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 @@ -1127,8 +1127,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;