From nobody Mon Nov 25 07:33:53 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37F9B2076C0 for ; Tue, 29 Oct 2024 23:47:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730245641; cv=none; b=BBTjHAUHkvB1Wcve/QV34z3Qnt3AanuVu48YVYsLmJZmN02H/E9/ttcVBnO3oUpIs3THOXhSKQVRcAZ/ZlYEjQSZUxgHMytbwAhfIxi6ACLG6kbEEi7Xw9R1w11UnVrs1NPkVUZEOlX7s65VOGmuZoSkjFqPRUcUPldHzVqMEs0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730245641; c=relaxed/simple; bh=FWTQKedBgI25UvpOduelkyTAV9UolhN9l61sZzz3sMM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cT+Rqst6rs3kDOU/SeXlUeLSfvhfzkNtLHulQZ6uwPtmPrxNiqhfmzM9ltljVc5dAPB4zt7TMPdtrmXUtc8dSaOPPC8yutfoc91+mT9pNEa35/jGBHNJaRzBuSjQlFnPBa6kHlhIfoW8b2sLmRZPBX9sIKQ0zG7tfphPwNUJMms= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=o8Sc7Anr; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="o8Sc7Anr" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=l9Jf67sY6k0pV20eW1NfvPqXo0KO+KBOFwOnCVfaRwQ=; b=o8Sc7AnrwtH8h7zE G7FZD45i/SWuj4e1pGJ0VEJo1lcCJROSiXg7t9MLy1jLSVnq/cxAIcXbhd7TsBFGNJgOekQ5xO3tr XvV5TVvrQ51v0O+SiO52bh1THhy7JtiWf2aElhq58/JJjK4TvbBCHq7ZHNnh1dtXsLXwIpdOSZv/q 4nBsvruKgBcjSP9GerIRDwbIdvdpUD+k7/aixtMSoKWGQsxJv4mqM7jLAOGyGXrOhGIC+9uh5KaSR oGkFx/RWbdixm9neswWpfQxg/Z53EW3X5tRuLE/f6TMKk7jY/frEePFfhcOafTFfCxSWoQzrjIbgQ 0Dq/tGja2+BjU5jE2w==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t5vvb-00EMNX-08; Tue, 29 Oct 2024 23:47:11 +0000 From: linux@treblig.org To: dmitry.baryshkov@linaro.org, ville.syrjala@linux.intel.com, jfalempe@redhat.com, tomi.valkeinen@ideasonboard.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH v2 3/3] Revert "drm/client: Add drm_client_modeset_check()" Date: Tue, 29 Oct 2024 23:47:05 +0000 Message-ID: <20241029234706.285087-4-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029234706.285087-1-linux@treblig.org> References: <20241029234706.285087-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" drm_client_modeset_check() was explicitly added in 2020 by commit 64593f2a6fc9 ("drm/client: Add drm_client_modeset_check()") but has never been used. This reverts commit 64593f2a6fc933bb9a410bc3f8c261f3e57a9601. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_client_modeset.c | 35 ++++------------------------ include/drm/drm_client.h | 1 - 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_cli= ent_modeset.c index cee5eafbfb81..39201c11eaac 100644 --- a/drivers/gpu/drm/drm_client_modeset.c +++ b/drivers/gpu/drm/drm_client_modeset.c @@ -995,7 +995,7 @@ bool drm_client_rotation(struct drm_mode_set *modeset, = unsigned int *rotation) } EXPORT_SYMBOL(drm_client_rotation); =20 -static int drm_client_modeset_commit_atomic(struct drm_client_dev *client,= bool active, bool check) +static int drm_client_modeset_commit_atomic(struct drm_client_dev *client,= bool active) { struct drm_device *dev =3D client->dev; struct drm_plane *plane; @@ -1062,10 +1062,7 @@ static int drm_client_modeset_commit_atomic(struct d= rm_client_dev *client, bool } } =20 - if (check) - ret =3D drm_atomic_check_only(state); - else - ret =3D drm_atomic_commit(state); + ret =3D drm_atomic_commit(state); =20 out_state: if (ret =3D=3D -EDEADLK) @@ -1126,30 +1123,6 @@ static int drm_client_modeset_commit_legacy(struct d= rm_client_dev *client) return ret; } =20 -/** - * drm_client_modeset_check() - Check modeset configuration - * @client: DRM client - * - * Check modeset configuration. - * - * Returns: - * Zero on success or negative error code on failure. - */ -int drm_client_modeset_check(struct drm_client_dev *client) -{ - int ret; - - if (!drm_drv_uses_atomic_modeset(client->dev)) - return 0; - - mutex_lock(&client->modeset_mutex); - ret =3D drm_client_modeset_commit_atomic(client, true, true); - mutex_unlock(&client->modeset_mutex); - - return ret; -} -EXPORT_SYMBOL(drm_client_modeset_check); - /** * drm_client_modeset_commit_locked() - Force commit CRTC configuration * @client: DRM client @@ -1168,7 +1141,7 @@ int drm_client_modeset_commit_locked(struct drm_clien= t_dev *client) =20 mutex_lock(&client->modeset_mutex); if (drm_drv_uses_atomic_modeset(dev)) - ret =3D drm_client_modeset_commit_atomic(client, true, false); + ret =3D drm_client_modeset_commit_atomic(client, true); else ret =3D drm_client_modeset_commit_legacy(client); mutex_unlock(&client->modeset_mutex); @@ -1246,7 +1219,7 @@ int drm_client_modeset_dpms(struct drm_client_dev *cl= ient, int mode) =20 mutex_lock(&client->modeset_mutex); if (drm_drv_uses_atomic_modeset(dev)) - ret =3D drm_client_modeset_commit_atomic(client, mode =3D=3D DRM_MODE_DP= MS_ON, false); + ret =3D drm_client_modeset_commit_atomic(client, mode =3D=3D DRM_MODE_DP= MS_ON); else drm_client_modeset_dpms_legacy(client, mode); mutex_unlock(&client->modeset_mutex); diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index bc0e66f9c425..ead3c3526ee3 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h @@ -177,7 +177,6 @@ int drm_client_modeset_create(struct drm_client_dev *cl= ient); void drm_client_modeset_free(struct drm_client_dev *client); int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int w= idth, unsigned int height); bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotat= ion); -int drm_client_modeset_check(struct drm_client_dev *client); int drm_client_modeset_commit_locked(struct drm_client_dev *client); int drm_client_modeset_commit(struct drm_client_dev *client); int drm_client_modeset_dpms(struct drm_client_dev *client, int mode); --=20 2.47.0