Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp659594pxv; Thu, 15 Jul 2021 12:44:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbUYH94CDMblFwG8Zg/6Z08ODNcDZ5ssDuLsRwCRcJKV6GTKvfASPUz/p3LpgAMrK3tbA6 X-Received: by 2002:a05:6e02:1d0e:: with SMTP id i14mr3161457ila.50.1626378275875; Thu, 15 Jul 2021 12:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378275; cv=none; d=google.com; s=arc-20160816; b=sACzO/Ncs+DdC52EQfUkmF/ukTJVWSMAumi+by0oumn4LgFmrTt8Xv3u78v9KsdBGu PXAV+Wa2PjojaJZUpA4rsQE9BhqzdPTXcS1dbJ719uhnVtEZ0wPpzBIjg8cNx+enTs4v 6bH/+ad8vJWKXCsU5Xyt0NH57HXUe8wKc8EgN4TTwnTa1//6rYG+jyHdBdDSF9lntnXC tp/l/S/QgkkFVYqvwQ0jN3I3Ucwmr/KSGwA7QGgwBQtUHlJ6WOmcnekqvpivQCgqMf4R 5aYvFy+JeBVBrFFgyFKRceUpH0saCJTWwFUT2MAOzWGYRIK8elLdMjkJ3vHQkYffqFUu jNvQ== 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=DMl5sPWBDaYnCBts0qHHArwT3eQSIcrEZjsTdW6mlhw=; b=NV7carl/onNXuccdGerJxH0C6KSiQFw04+FR9O0MdxrbD8UOTC7/ZUTH8zKm5kY+47 iqtTBUSDQiOlKuu7fiTTCjMJ6F7y+vLVrzHOTHUivnBepOjWW813vwTQ88IcpOjKkkv/ zJLfsqnvgqXyTh5uG71EPDk/twK2q8MfkZNE2ANpENSrCVNsLYK8aeJYAa09f9LO2G9H WnZr63XxXY3Oq8bT9416poSv+RtKviYGE5KJcdUY/AhHDdURR/CjMpWjkTY8YJiFFS2V X2QE8N6GoYS2036FVw5QpGjwAb3C2iSjw1sSQJMPfGhopEe6u75769/UGtrqBn3+Pb+X 3gEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wsXg8ezi; 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 u4si7614808jak.4.2021.07.15.12.44.23; Thu, 15 Jul 2021 12:44:35 -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=wsXg8ezi; 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 S244415AbhGOToA (ORCPT + 99 others); Thu, 15 Jul 2021 15:44:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:52808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244812AbhGOTPQ (ORCPT ); Thu, 15 Jul 2021 15:15:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 548D46141F; Thu, 15 Jul 2021 19:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376280; bh=Y/rFZ/gWYfBMuHT/nVvmrlwPvtz/nHJVl5OFLAkJb/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wsXg8ezimm7WOt/qK2276nO5H5xH04KbrJFfXAMRnvuTOC3HFzlOlHCL6ZHMK3NEN IiLbjNdZS0HCAW/ZmAed/rXWhmIzC+VHiiMqa2sSNidOhiL8GqmZ4ZYF/807hZRSOg OH3oJKTpKiHWW3Jlra/9eTbLTqP+KNscxlrgaOxg= 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.13 202/266] drm/msm/mdp4: Fix modifier support enabling Date: Thu, 15 Jul 2021 20:39:17 +0200 Message-Id: <20210715182645.840301586@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 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 @@ -349,6 +349,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) @@ -377,7 +383,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;