From nobody Tue Nov 26 00:58:55 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 D5F061CEADD for ; Tue, 22 Oct 2024 23:29:48 +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=1729639792; cv=none; b=BgrqVGGFEBoMguWfU5//mrypafX6iXInc0uo9FP0I4BCsDgiuM3gRUscvQ3QCI6j4OhB8mlqYi5glhPNpLZzDqKOK0crJpFRgWPjxa4B014OzuFQ0CBa33PahUSfu8oG5mlNyKLsPvCKJ6PJ5SYJ5oz1HQtqwexOHxMeNXe3Amg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729639792; c=relaxed/simple; bh=MW8IjQcGXvfLqPc5JoHqDyfjY2zCP9eWXkray5C89yQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kjcopYUpxC0k4VvfpFERAvXY0U24ai30wWNfvczvIspYzoHXMavCkJO9zJrug19l2P8xrpD/q/GISvhdbFmiyDfVemLdB/4zFDLdlGN9VJ4Eosm/T7Sc53slT7LUeFWhzUkjKj1QxjIo3/v40/nHpvvbKDKA6KUkbnPDDMidyD8= 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=Kyxf3bvH; 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="Kyxf3bvH" 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=ITRmfwM+nhDMcdL1axA1LkbzgcdJ47VaYDlOpmeKPqw=; b=Kyxf3bvHSwxC1fn6 GQ/QLK0DnNiN85/dlo4rnzlALQ20Xv5upG8S3T+l82AiYsIUALeupC9faUJRCnpn5/kyV8LAiw3z6 qJxPAc+phAxox8FndPazjQT3bTlcmrCDORbk98YPdnBGXU5pWPKtHCnGeN4nKjTbmM68ivo6FeHRf PsHrAGbhCvsv/khEpZYrP/1dUWZM79gWq6JYXRweoxkTRrv09BeZJvewIsMjX+OitqYXO4P1+HcWk cofLoMNeZlB6EBQctdhMFE/J5V4DkzAwXaMh/Up0OkYSxfVbKpTmOMA7zfrXtHyNf3jTzJiz7m+gq GsOy85IAFB4llrJCZg==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t3OJl-00CtGr-2n; Tue, 22 Oct 2024 23:29:37 +0000 From: linux@treblig.org To: 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 1/5] drm: Remove unused drm_atomic_helper_commit_planes_on_crtc Date: Wed, 23 Oct 2024 00:29:30 +0100 Message-ID: <20241022232934.238124-2-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022232934.238124-1-linux@treblig.org> References: <20241022232934.238124-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" The last use of drm_atomic_helper_commit_planes_on_crtc() was removed in 2018 by commit 6c246b81f938 ("drm/i915: Replace call to commit_planes_on_crtc with internal update, v2.") Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_atomic_helper.c | 72 ----------------------------- include/drm/drm_atomic_helper.h | 1 - 2 files changed, 73 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atom= ic_helper.c index 43cdf39019a4..dd8f7d6f5a36 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -2705,8 +2705,6 @@ static bool plane_crtc_active(const struct drm_plane_= state *state) * crtcs need to be updated though. * * Note that this function does all plane updates across all CRTCs in one = step. - * If the hardware can't support this approach look at - * drm_atomic_helper_commit_planes_on_crtc() instead. * * Plane parameters can be updated by applications while the associated CR= TC is * disabled. The DRM/KMS core will store the parameters in the plane state, @@ -2833,76 +2831,6 @@ void drm_atomic_helper_commit_planes(struct drm_devi= ce *dev, } EXPORT_SYMBOL(drm_atomic_helper_commit_planes); =20 -/** - * drm_atomic_helper_commit_planes_on_crtc - commit plane state for a CRTC - * @old_crtc_state: atomic state object with the old CRTC state - * - * This function commits the new plane state using the plane and atomic he= lper - * functions for planes on the specific CRTC. It assumes that the atomic s= tate - * has already been pushed into the relevant object state pointers, since = this - * step can no longer fail. - * - * This function is useful when plane updates should be done CRTC-by-CRTC - * instead of one global step like drm_atomic_helper_commit_planes() does. - * - * This function can only be savely used when planes are not allowed to mo= ve - * between different CRTCs because this function doesn't handle inter-CRTC - * dependencies. Callers need to ensure that either no such dependencies e= xist, - * resolve them through ordering of commit calls or through some other mea= ns. - */ -void -drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_st= ate) -{ - const struct drm_crtc_helper_funcs *crtc_funcs; - struct drm_crtc *crtc =3D old_crtc_state->crtc; - struct drm_atomic_state *old_state =3D old_crtc_state->state; - struct drm_crtc_state *new_crtc_state =3D - drm_atomic_get_new_crtc_state(old_state, crtc); - struct drm_plane *plane; - unsigned int plane_mask; - - plane_mask =3D old_crtc_state->plane_mask; - plane_mask |=3D new_crtc_state->plane_mask; - - crtc_funcs =3D crtc->helper_private; - if (crtc_funcs && crtc_funcs->atomic_begin) - crtc_funcs->atomic_begin(crtc, old_state); - - drm_for_each_plane_mask(plane, crtc->dev, plane_mask) { - struct drm_plane_state *old_plane_state =3D - drm_atomic_get_old_plane_state(old_state, plane); - struct drm_plane_state *new_plane_state =3D - drm_atomic_get_new_plane_state(old_state, plane); - const struct drm_plane_helper_funcs *plane_funcs; - bool disabling; - - plane_funcs =3D plane->helper_private; - - if (!old_plane_state || !plane_funcs) - continue; - - WARN_ON(new_plane_state->crtc && - new_plane_state->crtc !=3D crtc); - - disabling =3D drm_atomic_plane_disabling(old_plane_state, new_plane_stat= e); - - if (disabling && plane_funcs->atomic_disable) { - plane_funcs->atomic_disable(plane, old_state); - } else if (new_plane_state->crtc || disabling) { - plane_funcs->atomic_update(plane, old_state); - - if (!disabling && plane_funcs->atomic_enable) { - if (drm_atomic_plane_enabling(old_plane_state, new_plane_state)) - plane_funcs->atomic_enable(plane, old_state); - } - } - } - - if (crtc_funcs && crtc_funcs->atomic_flush) - crtc_funcs->atomic_flush(crtc, old_state); -} -EXPORT_SYMBOL(drm_atomic_helper_commit_planes_on_crtc); - /** * drm_atomic_helper_disable_planes_on_crtc - helper to disable CRTC's pla= nes * @old_crtc_state: atomic state object with the old CRTC state diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helpe= r.h index 9aa0a05aa072..6ad50c531fc0 100644 --- a/include/drm/drm_atomic_helper.h +++ b/include/drm/drm_atomic_helper.h @@ -107,7 +107,6 @@ void drm_atomic_helper_commit_planes(struct drm_device = *dev, uint32_t flags); void drm_atomic_helper_cleanup_planes(struct drm_device *dev, struct drm_atomic_state *old_state); -void drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_cr= tc_state); void drm_atomic_helper_disable_planes_on_crtc(struct drm_crtc_state *old_crtc_s= tate, bool atomic); --=20 2.47.0 From nobody Tue Nov 26 00:58:55 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 D82F51CEADF for ; Tue, 22 Oct 2024 23:29:48 +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=1729639790; cv=none; b=SGtEI8X0Bzj7Lvf4rEJhtppwkSMWnuacHTXiGHCFU48Za1X2KLEXpB3bvTBXqqDcE25AnB1RfCJYZz/OnPAhSslRba+y3MZXO2oP1l+LJ1ew4tDBQ71dU/cVqY68Sw3OSWupsjlXUAniTs7t35MVUJ2k+Z0+kyhqGJBwq+k7ogw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729639790; c=relaxed/simple; bh=mJJP4NFMgpUIHLmDof5C/WQkxSL1vtNV830l4pHYEAk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BxOWlKd9VkAsdjvYXuzAR4fanzZahHRV0rmsXfWmRjJALpwrMqohi43FT0Y8XIGhBghfcdbM2J1fZ5Up+Sp01iuLc6TBoJE+vK6qklBAHycB1Mvsh9CmHATNkzZOe/8AMPPxJqWYK/CQkdd1xEYFDOqo+gUOXkDL4FdUMGjcrw4= 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=U+FJoJOH; 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="U+FJoJOH" 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=a+8B/W4nG6OVt83hHSuwJrLKhvYzazktOCgXNngg1nM=; b=U+FJoJOHQBa9nRMK DzALhTBUhFAFmpvg8P8B236pJJ8rU3jux/O+0G33KHQFZJbnhlPOC1SJATJt6+95U6QVKUJwfGSKo nxh0QS4W7C/ize28lIduJPBFLybQV9er78QYrVvkUEShf3ycFd9Wl5/UOw0+RgkRlUCfTHgpKct+C oUWHAjxIN45F8h+c8B+bUPNqzEMj23r9NVP3hhGchh/9IURou9DXbVdRA9jGDAcecbjijNsXO0F/w 2/kM4PW8W3+NhPz/1UJ8T44CIFZaQpJoPhNEvWR54eHwc7QZSVCvz7SupukWTOk1SMFx6U/2ogLn3 92dDz5R6A4FYt+qOuw==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t3OJm-00CtGr-2D; Tue, 22 Oct 2024 23:29:38 +0000 From: linux@treblig.org To: 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 2/5] drm/sysfs: Remove unused drm_class_device_(un)register Date: Wed, 23 Oct 2024 00:29:31 +0100 Message-ID: <20241022232934.238124-3-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022232934.238124-1-linux@treblig.org> References: <20241022232934.238124-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_class_device_register() and drm_class_device_unregister() have been unused since commit ed89fff97382 ("drm/ttm: drop sysfs directory") Remove them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_sysfs.c | 32 -------------------------------- include/drm/drm_sysfs.h | 4 ---- 2 files changed, 36 deletions(-) diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index fb3bbb6adcd1..3bc90fe5cea3 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -548,35 +548,3 @@ struct device *drm_sysfs_minor_alloc(struct drm_minor = *minor) put_device(kdev); return ERR_PTR(r); } - -/** - * drm_class_device_register - register new device with the DRM sysfs class - * @dev: device to register - * - * Registers a new &struct device within the DRM sysfs class. Essentially = only - * used by ttm to have a place for its global settings. Drivers should nev= er use - * this. - */ -int drm_class_device_register(struct device *dev) -{ - if (!drm_class || IS_ERR(drm_class)) - return -ENOENT; - - dev->class =3D drm_class; - return device_register(dev); -} -EXPORT_SYMBOL_GPL(drm_class_device_register); - -/** - * drm_class_device_unregister - unregister device with the DRM sysfs class - * @dev: device to unregister - * - * Unregisters a &struct device from the DRM sysfs class. Essentially only= used - * by ttm to have a place for its global settings. Drivers should never use - * this. - */ -void drm_class_device_unregister(struct device *dev) -{ - return device_unregister(dev); -} -EXPORT_SYMBOL_GPL(drm_class_device_unregister); diff --git a/include/drm/drm_sysfs.h b/include/drm/drm_sysfs.h index 96a5d858404b..7695873a9456 100644 --- a/include/drm/drm_sysfs.h +++ b/include/drm/drm_sysfs.h @@ -3,13 +3,9 @@ #define _DRM_SYSFS_H_ =20 struct drm_device; -struct device; struct drm_connector; struct drm_property; =20 -int drm_class_device_register(struct device *dev); -void drm_class_device_unregister(struct device *dev); - void drm_sysfs_hotplug_event(struct drm_device *dev); void drm_sysfs_connector_hotplug_event(struct drm_connector *connector); void drm_sysfs_connector_property_event(struct drm_connector *connector, --=20 2.47.0 From nobody Tue Nov 26 00:58:55 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 D5E651CEAD4 for ; Tue, 22 Oct 2024 23:29:48 +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=1729639790; cv=none; b=BNV57oXhpePtYCFStX3l9Ydv3Frswu7QnaDgqIBbVAMIwkFcxD7+DjISWlOTS9il0bJe5jW6aV3QD+HpEMBW3uqUwAecCYCdVCAYMgXBPjXV9UrmqRw83qacPYNiR3YJ9lfe1imFJP0QTaw1l0EKRWnL3L11d7tRLYszjb4igMs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729639790; c=relaxed/simple; bh=UwRkCv/pdCmbbrU8lfOOknKM8Kkd/1K6UQrMyfcArRc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o1ZRiwsKi5I/Wiw5P4r1XRrkpGbwLe6QM1wrYqD2uIA+iy5PiRpFQaBJ9HhfzMlerER4SCz9Aume424+FcT83h33y8cerCtlFw0yqbDIcgnVnch7M8ZPGV2MDIw5JALvB+gQbKO2TSzLVzXKT00lofC0mwn7rkrByPVOuNmUvdM= 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=miiCJCUh; 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="miiCJCUh" 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=7tqnPkF2BTUcYbffZanA7zfXObwjUDobXcZGkQ4od/8=; b=miiCJCUhKGG/Ek0G WjNqQ78qCseA8+bWR4xRZsPFkTkPLUTitts/v6Sw+BaGwkIzk6anjII5irleL9WmskoNOS9U+p+u5 jhQ22tVqbiizvsMvFByh6ulMj/COw9BgpAtsdbvlF4FcajK4Jpl0SnxPvqR+QigUT9VANiKwY0ywC bJOqnxSU9yHk05TTEjqTfsZeQg+Djnuz6NgVz5i1kFQnqNnypbx//hWvUTWgIkRnUUVtKe5aAjRTl IbvL62sPERJHyZm3w3Fimlvc8wsGcKKS3vevJlvt4marKPeTxi2/VIOQdx9rT/mf6cd4REiXpnH9e RQdnRtMZCS32+VU5IQ==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t3OJn-00CtGr-1c; Tue, 22 Oct 2024 23:29:39 +0000 From: linux@treblig.org To: 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 3/5] drm/vblank: Remove unused drm_crtc_vblank_count_and_time Date: Wed, 23 Oct 2024 00:29:32 +0100 Message-ID: <20241022232934.238124-4-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022232934.238124-1-linux@treblig.org> References: <20241022232934.238124-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_crtc_vblank_count_and_time() was explicitly added by commit cf6483050e9b ("drm/irq: Add drm_crtc_vblank_count_and_time()") in 2015, but never used. Remove it, and rework comments that reference it. Signed-off-by: Dr. David Alan Gilbert Acked-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_vblank.c | 44 +++++++----------------------------- include/drm/drm_vblank.h | 10 ++++---- 2 files changed, 12 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 94e45ed6869d..67d6367e9f4b 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -908,10 +908,10 @@ drm_get_last_vbltimestamp(struct drm_device *dev, uns= igned int pipe, * drm_crtc_accurate_vblank_count() for such use-cases. * * Note that for a given vblank counter value drm_crtc_handle_vblank() - * and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time() - * provide a barrier: Any writes done before calling - * drm_crtc_handle_vblank() will be visible to callers of the later - * functions, if the vblank count is the same or a later one. + * and drm_crtc_vblank_count() provide a barrier: + * Any writes done before calling drm_crtc_handle_vblank() will be + * visible to callers of the later functions, if the vblank count is + * the same or a later one. * * See also &drm_vblank_crtc.count. * @@ -936,7 +936,6 @@ EXPORT_SYMBOL(drm_crtc_vblank_count); * modesetting activity. Returns corresponding system timestamp of the time * of the vblank interval that corresponds to the current vblank counter v= alue. * - * This is the legacy version of drm_crtc_vblank_count_and_time(). */ static u64 drm_vblank_count_and_time(struct drm_device *dev, unsigned int = pipe, ktime_t *vblanktime) @@ -959,33 +958,6 @@ static u64 drm_vblank_count_and_time(struct drm_device= *dev, unsigned int pipe, return vblank_count; } =20 -/** - * drm_crtc_vblank_count_and_time - retrieve "cooked" vblank counter value - * and the system timestamp corresponding to that vblank counter value - * @crtc: which counter to retrieve - * @vblanktime: Pointer to time to receive the vblank timestamp. - * - * Fetches the "cooked" vblank count value that represents the number of - * vblank events since the system was booted, including lost events due to - * modesetting activity. Returns corresponding system timestamp of the time - * of the vblank interval that corresponds to the current vblank counter v= alue. - * - * Note that for a given vblank counter value drm_crtc_handle_vblank() - * and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time() - * provide a barrier: Any writes done before calling - * drm_crtc_handle_vblank() will be visible to callers of the later - * functions, if the vblank count is the same or a later one. - * - * See also &drm_vblank_crtc.count. - */ -u64 drm_crtc_vblank_count_and_time(struct drm_crtc *crtc, - ktime_t *vblanktime) -{ - return drm_vblank_count_and_time(crtc->dev, drm_crtc_index(crtc), - vblanktime); -} -EXPORT_SYMBOL(drm_crtc_vblank_count_and_time); - /** * drm_crtc_next_vblank_start - calculate the time of the next vblank * @crtc: the crtc for which to calculate next vblank time @@ -1978,10 +1950,10 @@ EXPORT_SYMBOL(drm_handle_vblank); * This is the native KMS version of drm_handle_vblank(). * * Note that for a given vblank counter value drm_crtc_handle_vblank() - * and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time() - * provide a barrier: Any writes done before calling - * drm_crtc_handle_vblank() will be visible to callers of the later - * functions, if the vblank count is the same or a later one. + * and drm_crtc_vblank_count() * provide a barrier: + * Any writes done before calling * drm_crtc_handle_vblank() will be + * visible to callers of the later functions, if the vblank count is + * the same or a later one. * * See also &drm_vblank_crtc.count. * diff --git a/include/drm/drm_vblank.h b/include/drm/drm_vblank.h index 151ab1e85b1b..572e54425970 100644 --- a/include/drm/drm_vblank.h +++ b/include/drm/drm_vblank.h @@ -141,10 +141,10 @@ struct drm_vblank_crtc { * Current software vblank counter. * * Note that for a given vblank counter value drm_crtc_handle_vblank() - * and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time() - * provide a barrier: Any writes done before calling - * drm_crtc_handle_vblank() will be visible to callers of the later - * functions, iff the vblank count is the same or a later one. + * and drm_crtc_vblank_count() provide a barrier: + * Any writes done before calling drm_crtc_handle_vblank() will be + * visible to callers of the later functions, iff the vblank count is + * the same or a later one. * * IMPORTANT: This guarantee requires barriers, therefor never access * this field directly. Use drm_crtc_vblank_count() instead. @@ -260,8 +260,6 @@ struct drm_vblank_crtc *drm_crtc_vblank_crtc(struct drm= _crtc *crtc); int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs); bool drm_dev_has_vblank(const struct drm_device *dev); u64 drm_crtc_vblank_count(struct drm_crtc *crtc); -u64 drm_crtc_vblank_count_and_time(struct drm_crtc *crtc, - ktime_t *vblanktime); int drm_crtc_next_vblank_start(struct drm_crtc *crtc, ktime_t *vblanktime); void drm_crtc_send_vblank_event(struct drm_crtc *crtc, struct drm_pending_vblank_event *e); --=20 2.47.0 From nobody Tue Nov 26 00:58:55 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 D5E0A1CDA2F for ; Tue, 22 Oct 2024 23:29:48 +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=1729639791; cv=none; b=JoXmUvB3knPX723H9EnGG+y4wjei/8T3PvHbrjJ6boVdF25ng3lHsMUjhqdkuKo5QJPKCxC+EKmiGdE1X0zmnxs4v8CMpuj2RzbDupcLGrsDYQJjBGnpX3gRfXiWr6IoPRwH6jwItuQCLowux4JchBib0JFeG01N1warBsT+DEE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729639791; c=relaxed/simple; bh=yUlmEOi8he0CHjUDEoe0RYuVN90weGzbpTqC9SIDu1E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bMOi2jVdAKFzarp+LPkRYitfaOPYhStmHsArdg01k/k0Do/kL/FlXOdlFMfFSEtIrXMz+xIw0Ig0A/IpaavZhUu5tvfDEsQP9cJcWxbZOQGldBESsdH0+u+6C3PyktVHj+ewcvRdU3brvA4BaDXg1uIjsLdda7CktT0Zb3915+I= 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=OUIYYQbg; 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="OUIYYQbg" 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=uJcBaImOo4siGqiQ+8KKjL3HddlpCKbwDdzxJEsT5x8=; b=OUIYYQbgjqSlig6k LCDpUXf/3m5d9Sm+jqdQJhaS757yJJcaVu/Yj3W89q1vH8qbib67jvqGNdF00VOTC/JCePt492lKh fvFcj3e9k77oRERqxezwxE3p3v3sChxywSnJZTxcr4r0qT2M6y/dvANCESWKIvwI/7uzhVGJUKydC MtW2NR3etRXq2NsN7B0qfx+01QTsIwtcIWmXIwxSgiwgU0Lk1f2RBabBWAV12vbFm134zzrbiYPDs RZWN3nCXB9pcvNX+IHjITJffJyhzl7UBaP+sksf92Czfx/4vy50tQynQf+t5sUPCRKmjbjW92QFBH gNHcigZwVbZ9t1UB1A==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t3OJo-00CtGr-0a; Tue, 22 Oct 2024 23:29:40 +0000 From: linux@treblig.org To: 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 4/5] drm/client: Remove unused drm_client_framebuffer_flush Date: Wed, 23 Oct 2024 00:29:33 +0100 Message-ID: <20241022232934.238124-5-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022232934.238124-1-linux@treblig.org> References: <20241022232934.238124-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_framebuffer_flush() was explicitly added in 2020 by commit c9c03e3cf072 ("drm/client: Add drm_client_framebuffer_flush()") but has never been used. Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/drm_client.c | 33 --------------------------------- include/drm/drm_client.h | 1 - 2 files changed, 34 deletions(-) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index bfedcbf516db..5d10ad3c2ca5 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -552,39 +552,6 @@ void drm_client_framebuffer_delete(struct drm_client_b= uffer *buffer) } EXPORT_SYMBOL(drm_client_framebuffer_delete); =20 -/** - * drm_client_framebuffer_flush - Manually flush client framebuffer - * @buffer: DRM client buffer (can be NULL) - * @rect: Damage rectangle (if NULL flushes all) - * - * This calls &drm_framebuffer_funcs->dirty (if present) to flush buffer c= hanges - * for drivers that need it. - * - * Returns: - * Zero on success or negative error code on failure. - */ -int drm_client_framebuffer_flush(struct drm_client_buffer *buffer, struct = drm_rect *rect) -{ - if (!buffer || !buffer->fb || !buffer->fb->funcs->dirty) - return 0; - - if (rect) { - struct drm_clip_rect clip =3D { - .x1 =3D rect->x1, - .y1 =3D rect->y1, - .x2 =3D rect->x2, - .y2 =3D rect->y2, - }; - - return buffer->fb->funcs->dirty(buffer->fb, buffer->client->file, - 0, 0, &clip, 1); - } - - return buffer->fb->funcs->dirty(buffer->fb, buffer->client->file, - 0, 0, NULL, 0); -} -EXPORT_SYMBOL(drm_client_framebuffer_flush); - #ifdef CONFIG_DEBUG_FS static int drm_client_debugfs_internal_clients(struct seq_file *m, void *d= ata) { diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index bc0e66f9c425..560aae47e06d 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h @@ -165,7 +165,6 @@ struct drm_client_buffer { struct drm_client_buffer * drm_client_framebuffer_create(struct drm_client_dev *client, u32 width, u3= 2 height, u32 format); void drm_client_framebuffer_delete(struct drm_client_buffer *buffer); -int drm_client_framebuffer_flush(struct drm_client_buffer *buffer, struct = drm_rect *rect); int drm_client_buffer_vmap_local(struct drm_client_buffer *buffer, struct iosys_map *map_copy); void drm_client_buffer_vunmap_local(struct drm_client_buffer *buffer); --=20 2.47.0 From nobody Tue Nov 26 00:58:55 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 D5EB61CEAD8 for ; Tue, 22 Oct 2024 23:29:48 +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=1729639790; cv=none; b=FXlgXwpaQQ5gv1Jr0+gjBROu1GgXXkinQXD4BSxvI7PDaNZ+sfH4kUbEA7/KWeTFAMe6gSSQlkOhsPf9vwMETxpzcpb0woEg2rGrJICHGDQaujukDIW5qz3kzLdeviKfA4mY8ohkeLpuSEuzhGebWn+nJbwq60TFbzeW9KxHmvo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729639790; c=relaxed/simple; bh=ShJZn/1jzEKzGtEdVAVCAsxwzTkHKyaE2pTo9xC+Irw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OqZQjLbm7VYmcvFxKBQfB8YbFBIOBT2tKAFMZZzSCcDyI8aQ8eY5ZEcQt5vbYT5UIZiT1KTmbjVWcv/r+WOqdzqrXFpsMebQSoqfBiVuO3LXvTPSFfs+9JkFJhAn8498O07RA4Uf0Vrr25wIwXj4m/CV0mZotSbkQ09v9/87qBw= 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=RfgC+caG; 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="RfgC+caG" 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=ysbfho3bNM6XX4PTBUAzuKwO5RGewbfKhzT2qUY5ztM=; b=RfgC+caGgGJpt6vy PkRfcfdL7k4tJ3Q3em7z+fNuMhMkhDz8MbHODCpF6ij85AVp9uw5ZggVi9fADHBok93X0vXwrVj41 3S3Qqnc9wfbzmh/G/SCUy0agyIofFviTM5aTPSrcFxWjcJ07vexqr9bk1oMpySOQg38vswnjpOzpe KhVP7KaN2HTdGHYipY7/cVdbMeFb61BN+q8NufVECjWXovSsfR6j4gHKT7mlQquLZ9tBCMmdO0qig cY2nATh7MB6OQ7yDtP73uljUWOcGPuV/kM4rvcYLQ7Q3ezfjAPrGLsVCDTpYknCQAifZBEkFYZTkE Xu2C+pdhSEhsByloUA==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t3OJo-00CtGr-3C; Tue, 22 Oct 2024 23:29:41 +0000 From: linux@treblig.org To: 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 5/5] drm/client: Remove unused drm_client_modeset_check Date: Wed, 23 Oct 2024 00:29:34 +0100 Message-ID: <20241022232934.238124-6-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022232934.238124-1-linux@treblig.org> References: <20241022232934.238124-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. Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/drm_client_modeset.c | 24 ------------------------ include/drm/drm_client.h | 1 - 2 files changed, 25 deletions(-) diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_cli= ent_modeset.c index cee5eafbfb81..69e1ce4d18cd 100644 --- a/drivers/gpu/drm/drm_client_modeset.c +++ b/drivers/gpu/drm/drm_client_modeset.c @@ -1126,30 +1126,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 diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index 560aae47e06d..e1fd32adb3e9 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h @@ -176,7 +176,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