Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp631309pxv; Thu, 15 Jul 2021 12:00:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIm8FA4UYqStctd69QZkng6mIS3vMU/T0WhHzUCbXmh/DkBdCXZDith2SuhuNlA4HZq5Zf X-Received: by 2002:a05:6638:34aa:: with SMTP id t42mr5290290jal.128.1626375646417; Thu, 15 Jul 2021 12:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375646; cv=none; d=google.com; s=arc-20160816; b=tFGe677Y6oGOaVqj5cO9J0UmacPOzAd7G0UiegRlHP7/Pa/QOG8lix2R+cHMBA9hdv YtrkXshDXoRIJn3YpUKO9L6UZ+OY0KoSj8wAiHHrfPIzt9zJQi8U/i9xIJvvrgJUDjdt tq2PI2MMuVP+8+XNHA8gyMUvRXpQ6zYWJWBEkU70cYrU72g35XuQdeZDd+kqXmDnzIXJ G3Zm4uxtvsghyjTOp8p+yQiro6KW0btb2w2Z36Me915qwICrt7btvKxpXVDXVxsOZ6Id npjFkP9gRS+thNNKECXfPN25wNmB6pVa8gIVEdeRkXm6msYoLkjW+VzhKIlKBCe0i97M S2qw== 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=NMiXQubOACNN+gTAuOnwyl29Qv0EL6a/uL1MBO1rWuA=; b=kmq6OI3ajrzArXVMUB7W0iGWWq8LWYRsNlnPa94j69EoUPTiBqqJ5Agl2cb263T1ni e35enL2rqLkIg66VBOEoDH+OHutLgPmiB+td2f0GbckVf7kVdepc4/Z6XlD/Ibgk/sR6 bUySrri7GNkj9bSrECP7H2NLiz3l+lBzVXlUFEySd4RKbrF+mxQLrUeyh3WS5hdkyQ7f cF5+u4uMDG0KgIERNaLIDK+BUuESkI1ZKsFK+FUDusCpq6yCghPTZRCeke5yOw7Cj048 spNk21hRhmH/snydYoJqzIug/i/xqwPKyXfrlUmYyizjI6NwPqcms62hlL+iJafKI2S/ jc7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=of6mRMrr; 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 y9si7355923ilv.11.2021.07.15.12.00.33; Thu, 15 Jul 2021 12:00:46 -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=of6mRMrr; 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 S242798AbhGOTCP (ORCPT + 99 others); Thu, 15 Jul 2021 15:02:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:58972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241825AbhGOSyh (ORCPT ); Thu, 15 Jul 2021 14:54:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B4B82610C7; Thu, 15 Jul 2021 18:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375104; bh=a6833TJ0mkZ/v03O42FFwRWBA1BZaCeWzqtkI87+qAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=of6mRMrry/NJnVUrLCPJw3DfWQXuy+bAtplL+BpU73oOEZPA7fl5BMruxkZ3Y28MJ iez/D7JpjMUBj6lWg5qJT3Jx2uvyFZEFWPLu05Pv4Q75vcrXrUKfBxu+N53w2gsjro w+/ShdkNTTDbquljO8b39yRvN47f8+P00yefWmpE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pekka Paalanen , Lyude Paul , Rob Clark , Jordan Crouse , Emil Velikov , Sam Ravnborg , Daniel Vetter Subject: [PATCH 5.10 162/215] drm/msm/mdp4: Fix modifier support enabling Date: Thu, 15 Jul 2021 20:38:54 +0200 Message-Id: <20210715182628.172527262@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 35cbb8c91e9cf310277d3dfb4d046df8edf2df33 upstream. Setting the cap without the modifier list is very confusing to userspace. Fix that by listing the ones we support explicitly. Stable backport so that userspace can rely on this working in a reasonable way, i.e. that the cap set implies IN_FORMATS is available. Acked-by: Pekka Paalanen Reviewed-by: Lyude Paul Cc: stable@vger.kernel.org Cc: Pekka Paalanen Cc: Rob Clark Cc: Jordan Crouse Cc: Emil Velikov Cc: Sam Ravnborg Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-5-daniel.vetter@ffwll.ch Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 -- drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c @@ -88,8 +88,6 @@ static int mdp4_hw_init(struct msm_kms * if (mdp4_kms->rev > 1) mdp4_write(mdp4_kms, REG_MDP4_RESET_STATUS, 1); - dev->mode_config.allow_fb_modifiers = true; - out: pm_runtime_put_sync(dev->dev); --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c @@ -347,6 +347,12 @@ enum mdp4_pipe mdp4_plane_pipe(struct dr return mdp4_plane->pipe; } +static const uint64_t supported_format_modifiers[] = { + DRM_FORMAT_MOD_SAMSUNG_64_32_TILE, + DRM_FORMAT_MOD_LINEAR, + DRM_FORMAT_MOD_INVALID +}; + /* initialize plane */ struct drm_plane *mdp4_plane_init(struct drm_device *dev, enum mdp4_pipe pipe_id, bool private_plane) @@ -375,7 +381,7 @@ struct drm_plane *mdp4_plane_init(struct type = private_plane ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; ret = drm_universal_plane_init(dev, plane, 0xff, &mdp4_plane_funcs, mdp4_plane->formats, mdp4_plane->nformats, - NULL, type, NULL); + supported_format_modifiers, type, NULL); if (ret) goto fail;