From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 1/7] drm: Add a helper function for printing a debugfs_regset32. Date: Mon, 25 Mar 2019 09:43:58 -0700 Message-ID: <87zhpi29bl.fsf@anholt.net> References: <20190220210343.28157-1-eric@anholt.net> <20190221093757.GL2665@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: In-Reply-To: <20190221093757.GL2665@phenom.ffwll.local> Sender: linux-kernel-owner@vger.kernel.org To: Daniel Vetter Cc: dri-devel@lists.freedesktop.org, Paul Kocialkowski , Maxime Ripard , linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Daniel Vetter writes: > On Wed, Feb 20, 2019 at 01:03:37PM -0800, Eric Anholt wrote: >> The debugfs_regset32 is nice to use for reducing boilerplate in >> dumping a bunch of regs in debugfs, but we also want to be able to >> print to dmesg them at runtime for driver debugging. drm_printer lets >> us format debugfs and the printk the same way. >>=20 >> Signed-off-by: Eric Anholt >> --- >> drivers/gpu/drm/drm_print.c | 16 ++++++++++++++++ >> include/drm/drm_print.h | 2 ++ >> 2 files changed, 18 insertions(+) >>=20 >> diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c >> index 0e7fc3e7dfb4..5ecc0f04cd0c 100644 >> --- a/drivers/gpu/drm/drm_print.c >> +++ b/drivers/gpu/drm/drm_print.c >> @@ -253,3 +253,19 @@ void drm_err(const char *format, ...) >> va_end(args); >> } >> EXPORT_SYMBOL(drm_err); >> + > > A bit of kerneldoc would be nice. With that: > > Reviewed-by: Daniel Vetter +/** + * drm_print_regset32 - print the contents of registers to a + * &drm_printer stream. + * + * @p: the &drm printer + * @regset: the list of registers to print. + * + * Often in driver debug, it's useful to be able to either capture the + * contents of registers in the steady state using debugfs or at + * specific points during operation. This lets the driver have a + * single list of registers for both. + */ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlyZBU4ACgkQtdYpNtH8 nui+JhAAj/z8uWtwRTJDBxpJ34iGxOGP4H36JH/bYfVsQwDjjv0su8SZEvPPEWPa eszpaZzYDhSAL+ObjZ2+tS0ZpPp6yjF2YTdgauZ4BiGU1foxPMuMfZxnA6PJXtNb zBm+At4XaBcxaRR1jz6qzj+Dop5gJJhJhUPW/nf+d7OG5dXadwZG5b4bFStX1cc4 eZOsVDZO4qPa+z+j11OATkuaOIGdTbuk3FsAK2CTso1dRvu4K4BGkuCMkx5uRD6/ HZeO1/1BTwYpOahxAQzdSTYUgRgJLURHoutsyodYdRwQPA7dW6UVRNtwuMptJQ2C leuNTAzTMDP5lqLCnXqR1kbJowf1S+2fW2amk1hLBi9EgKQKzQsbmV+k1am+2o09 JFyunF6Pbt2RvH6gy0uajGHXA92wStb14MJRWHZerylf7OzILHF7blezLMJpZT0V 0hktMnjiIThnEG5Sb2RyWXiFxT9PMHN7p5S8hYNnQMjr/0sHKlpvbWBpil1+4Vq9 8TSAXEXD9sNYlWmdTyONqjHBo5Q8pYZECJLi0mRPiH9FZc3CHUlp7KptcvBRh1Wh ApYoy4HM+ajyoslS6ccaZWX+J/3iz70qXcYWmvQ4fcfP64pu59YM5A66XQQzNe24 +28nVhk9PERlE7bK4uIYVlki/2vAFnTQH5XJ9fr8dmxN7uLkx3U= =X4XQ -----END PGP SIGNATURE----- --=-=-=--