Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp710679pxv; Thu, 15 Jul 2021 14:08:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycno75WVbRZXoxzeypjJwXiKUVSUPgVaWvHFCI9SKwG77p2DBB4dFBHf/JzvcGiR7Etpjm X-Received: by 2002:a05:6402:7cc:: with SMTP id u12mr9806540edy.156.1626383291869; Thu, 15 Jul 2021 14:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383291; cv=none; d=google.com; s=arc-20160816; b=kNVrZUGIo3NdlakLY1u0kXM/FDgubOgmOaMf1ZZBZdZikdQboCvU1dtiJbk7hYu5LW V8qMGl/x1f6Sy9Eh56bpJmmuGStObmn7MHljS8TwaKBikM034HpR7TsZobkmwai+999u pxvFKRUj0buRmKbvxIB650UzmTIzlxoGWyxPd0Z8MEfWchmhTp78lG+FsO3Trl+BEDTt hqK5xqLIh6MOr3Q2vlntuDCVV2zDMLEuq246bYHPwexj1c5GeXKqzrVwsp4t5YSA4Cp6 oUTG2h/mbmDeGR1kqXqT63isrbovXkz3ufRB7zA6CxcLD9NRNJq1r8PjSBG0GQvY2O/W doEg== 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=VOzdFO/4DzlGYdlM5bPBrJj1WEh8nygGVnq9y3TBAo7vJZCqlm+06G7dsgdwn4PD6q YppjpUuwKyEn5i5rZmX/8/hLOS9hlLxKdC2cI147zebOQEZBUFlSNmGbdn7k5ZVQGdNS sFKMtfJg3QgdENp0/ABpmv7bRu2KzK/YbneeA6yUqblN8wCID6jZFbBjIXAj4vm050lG Y7jNxVe2P8l20DnV+86y4P/lqHvtFtRoS1hAvj9VlwmuzAHlirTOlVAoA1cj+OFqxxug 4kUvGxFZQO7VTW7KVTwZKwcCrVxOnepGjj+podXMqmhTALO84oTrxJP7woapabRavfsT psPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ifHUVJo9; 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 ck13si511967ejb.145.2021.07.15.14.07.49; Thu, 15 Jul 2021 14:08:11 -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=ifHUVJo9; 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 S245323AbhGOTTg (ORCPT + 99 others); Thu, 15 Jul 2021 15:19:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:38862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241167AbhGOTEl (ORCPT ); Thu, 15 Jul 2021 15:04:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 94A676140F; Thu, 15 Jul 2021 19:00:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375652; bh=a6833TJ0mkZ/v03O42FFwRWBA1BZaCeWzqtkI87+qAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ifHUVJo923cPIeMgzCYdNtbXSK734F0wyUFcX0mSu350PHHd35Bm2kCJN+ABrUQ75 SbiM0eWYA7BPnX87g/2bfHD9A4o4Uzzc+GBF46psKFrZh6fp+erX+D9nNDOqY0wKxb o2z8X/TDVwYrxzAlN74CttYScU1bfKtAL/M4RWJk= 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.12 178/242] drm/msm/mdp4: Fix modifier support enabling Date: Thu, 15 Jul 2021 20:39:00 +0200 Message-Id: <20210715182624.585313160@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 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;