From patchwork Wed Feb 9 17:24:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 541128 Delivered-To: patch@linaro.org Received: by 2002:ad5:420f:0:0:0:0:0 with SMTP id e15csp1530331imo; Wed, 9 Feb 2022 09:25:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGO2pV7q3B9NyUxWD1XbSD9ynG12vXqJOC7iPL7iPV7SG+1ZOzw2aNa9aVpmavZpYbLC6W X-Received: by 2002:a05:6a00:1c44:: with SMTP id s4mr3450851pfw.46.1644427545158; Wed, 09 Feb 2022 09:25:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644427545; cv=none; d=google.com; s=arc-20160816; b=Q7l6eXQF1qdMV/F7ttiMkVHoJ0RGMEr9OSULILjyKoF979UkSHbK2XIfSzQ9lj/ADq dYdSm1Y5N+bdt9GoBr0ZMuDFcX/VG+PFooxWeMTT112dJNKDjRds5zIjb8sGKM3lD4kB ZwO2cmqkMQZVegWELPAV+wf8vs/6IisBErHM05k2eKQ9qvWVQKIJ41WNdkf9NPbjxuEc jN4JSfwbyU3HAROAqopVxYNrY+ScLyfW/AaJIZ2fTZZQel8ZD9rOKY4M7qKQrLzl5Ohg dvBIbrW/d33Q5K9wq18hLlw+AdUJfaeXbx0rA2O0vSoqNUvInA4zyItdMNBuZhfTn/ok v+4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=1/ATy1SER9Rft7B49K84iltLuTk/P0va3Tz7LA1Pnkg=; b=s6Hq+5RffnUgXJuacVwRqZJSXry9ODP/fVtl5MvhEe0pP3KqxDZeEWVn6+f9py5SAp M7F0QATb4up9JuX/8kpy8gonfEOku90tSb6LdDCvWP6wRGfzwsbpU4XMw8Ifo1/9GztM MWKoFZFcjx8McuriI6y3Xmu2yyMkl7gjWZhAkg+AQfRryN4EWp10N2e3YuZVSSPxY2QI YAipquM0bMmLs1bE51w5UOtwA1O/3zum5r0cpkfRgW0q9eODFKva2znw91KniOW4o9eL 9acF99BAQLnpVEjBi1WOKJVsQR3oniD1dhG8Kb8RA+r2XLamrzKq0uvfNQiqz4MFtI8u ccrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IqG7ATjn; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id nh8si5441897pjb.155.2022.02.09.09.25.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 09:25:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IqG7ATjn; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 121CA10E3F2; Wed, 9 Feb 2022 17:25:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by gabe.freedesktop.org (Postfix) with ESMTPS id F0F8F89CFA for ; Wed, 9 Feb 2022 17:25:25 +0000 (UTC) Received: by mail-lj1-x231.google.com with SMTP id z7so4441529ljj.4 for ; Wed, 09 Feb 2022 09:25:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1/ATy1SER9Rft7B49K84iltLuTk/P0va3Tz7LA1Pnkg=; b=IqG7ATjnxOef+EGAmIBzFkZpr3VGQI8n1YxhsSjR2oK/919PYBxL1+WBGyRZMqhjbj y8qpYq5GXxIO2FQ747SLGQ5Y5Ew7VgoxOLaHpalMs0keAVb25PHAxldR9VmKfvKvPdpD ZfdggSY8xCsBodClGtri3nGKTPBwYwRjiM6+YdfwabZxnfNoFv7VdTzdgVWtzq3d1MBS BMYt6ayNuaqwhy0b8QFNCZwvgXMnrgsVqJY0vUkEm2vjIDbsA0YJdAAcB78bCOsOBGN9 1YgVWbpN0AwcHvrkfx1mYg+n+hPAFASbxQrQbflPPEfwWXF4QyTdF7oTSpha9r7GiBP4 qPNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1/ATy1SER9Rft7B49K84iltLuTk/P0va3Tz7LA1Pnkg=; b=mZypDqxFBo9XRXXXDf8+U4KXKgEbFkoTtSwch/Z0iTpvFxyMmvzofcWwWnjdDvs7UO GkOEeWov8zr2aqngSahxHoApKcvafM6PgHX6fYzaSO2qHkznA+BIYuoL1f1JBWiH0l0H ZHC+nL6t3kUHCzqJ9x1rs51NTaLzIFN92ZInYmeuv8WIvmyCmWJBQIndKJNZyrLOqJxS +6f7tZ9XZB07ERuQUqDOXJxczXkcJiP9UYTOGQuIq8iKrza2oGGJ/nGiaxyObGwczyGO Mws9cEu5X4MQDkBSmX69Y62+5YvOPFXoR/P1Clg83mVLdH11BrDfTM3YELbAxFsNRWme hJjw== X-Gm-Message-State: AOAM533h3wuYFvaJY+uLhJpxf7+o/aIs9gAfJVixBSXvjvhlsud9IcGq pGEFC1lyqd/1S1lfCjBs4Mieyw== X-Received: by 2002:a2e:9916:: with SMTP id v22mr2187751lji.382.1644427524297; Wed, 09 Feb 2022 09:25:24 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u14sm2560055lji.40.2022.02.09.09.25.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 09:25:23 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH 02/25] drm/msm/dpu: do not limit the zpos property Date: Wed, 9 Feb 2022 20:24:57 +0300 Message-Id: <20220209172520.3719906-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209172520.3719906-1-dmitry.baryshkov@linaro.org> References: <20220209172520.3719906-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Stop limiting zpos property values, we use normalized_zpos anyway. And nothing stops userspace from assigning several planes to a single zpos (it is a userspace bug, but the kernel is forgiving about it). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 3fcc964dec0a..c04c3be16d85 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -1429,7 +1429,6 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev, struct dpu_plane *pdpu; struct msm_drm_private *priv = dev->dev_private; struct dpu_kms *kms = to_dpu_kms(priv->kms); - int zpos_max = DPU_ZPOS_MAX; uint32_t num_formats; int ret = -EINVAL; @@ -1467,14 +1466,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev, pdpu->catalog = kms->catalog; - if (kms->catalog->mixer_count && - kms->catalog->mixer[0].sblk->maxblendstages) { - zpos_max = kms->catalog->mixer[0].sblk->maxblendstages - 1; - if (zpos_max > DPU_STAGE_MAX - DPU_STAGE_0 - 1) - zpos_max = DPU_STAGE_MAX - DPU_STAGE_0 - 1; - } - - ret = drm_plane_create_zpos_property(plane, 0, 0, zpos_max); + ret = drm_plane_create_zpos_property(plane, 0, 0, DPU_ZPOS_MAX); if (ret) DPU_ERROR("failed to install zpos property, rc = %d\n", ret);