Re: [PATCH v10 6/6] Documentation: iio: Document high-speed DMABUF based API
Hi Paul. On 6/7/24 12:44 AM, Paul Cercueil wrote: > Hi Randy, > > Le jeudi 06 juin 2024 à 10:32 -0700, Randy Dunlap a écrit : >> Hi, >> >> On 6/5/24 4:08 AM, Paul Cercueil wrote: >>> Document the new DMABUF based API. >>> >>> Signed-off-by: Paul Cercueil >>> Signed-off-by: Nuno Sa >>> >>> --- >>> v2: - Explicitly state that the new interface is optional and is >>> not implemented by all drivers. >>> - The IOCTLs can now only be called on the buffer FD returned >>> by >>> IIO_BUFFER_GET_FD_IOCTL. >>> - Move the page up a bit in the index since it is core stuff >>> and not >>> driver-specific. >>> >>> v3: Update the documentation to reflect the new API. >>> >>> v5: Use description lists for the documentation of the three new >>> IOCTLs >>> instead of abusing subsections. >>> >>> v8: Renamed dmabuf_api.rst -> iio_dmabuf_api.rst, and updated >>> index.rst >>> whose format changed in iio/togreg. >>> --- >>> Documentation/iio/iio_dmabuf_api.rst | 54 >>> >>> Documentation/iio/index.rst | 1 + >>> 2 files changed, 55 insertions(+) >>> create mode 100644 Documentation/iio/iio_dmabuf_api.rst >>> >>> diff --git a/Documentation/iio/iio_dmabuf_api.rst >>> b/Documentation/iio/iio_dmabuf_api.rst >>> new file mode 100644 >>> index ..1cd6cd51a582 >>> --- /dev/null >>> +++ b/Documentation/iio/iio_dmabuf_api.rst >>> @@ -0,0 +1,54 @@ >>> +.. SPDX-License-Identifier: GPL-2.0 >>> + >>> +=== >>> +High-speed DMABUF interface for IIO >>> +=== >>> + >>> +1. Overview >>> +=== >>> + >>> +The Industrial I/O subsystem supports access to buffers through a >>> +file-based interface, with read() and write() access calls through >>> the >>> +IIO device's dev node. >>> + >>> +It additionally supports a DMABUF based interface, where the >>> userspace >>> +can attach DMABUF objects (externally created) to a IIO buffer, >>> and >> >> I would say/write: to an IIO buffer, > > Right. > >>> +subsequently use them for data transfers. >>> + >>> +A userspace application can then use this interface to share >>> DMABUF >>> +objects between several interfaces, allowing it to transfer data >>> in a >>> +zero-copy fashion, for instance between IIO and the USB stack. >>> + >>> +The userspace application can also memory-map the DMABUF objects, >>> and >>> +access the sample data directly. The advantage of doing this vs. >>> the >>> +read() interface is that it avoids an extra copy of the data >>> between the >>> +kernel and userspace. This is particularly useful for high-speed >>> devices >>> +which produce several megabytes or even gigabytes of data per >>> second. >>> +It does however increase the userspace-kernelspace synchronization >>> +overhead, as the DMA_BUF_SYNC_START and DMA_BUF_SYNC_END IOCTLs >>> have to >>> +be used for data integrity. >>> + >>> +2. User API >>> +=== >>> + >>> +As part of this interface, three new IOCTLs have been added. These >>> three >>> +IOCTLs have to be performed on the IIO buffer's file descriptor, >>> +obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. >>> + >>> + ``IIO_BUFFER_DMABUF_ATTACH_IOCTL(int)`` >> >> (int fd) >> ? > > Yes, I can change that. Although it's very obvious what the "int" is > for, given the text above. > Yes. This is just to be consistent with the text below: + ``IIO_BUFFER_DMABUF_ENQUEUE_IOCTL(struct iio_dmabuf *iio_dmabuf)`` >> >>> + Attach the DMABUF object, identified by its file descriptor, >>> to the >>> + IIO buffer. Returns zero on success, and a negative errno >>> value on >>> + error. >>> + >>> + ``IIO_BUFFER_DMABUF_DETACH_IOCTL(int)`` >> >> ditto. >> >>> + Detach the given DMABUF object, identified by its file >>> descriptor, >>> + from the IIO buffer. Returns zero on success, and a negative >>> errno >>> + value on error. >>> + >>> + Note that closing the IIO buffer's file descriptor will >>> + automatically detach all previously attached DMABUF objects. >>> + >>> + ``IIO_BUFFER_DMABUF_ENQUEUE_IOCTL(struct iio_dmabuf >>> *iio_dmabuf)`` >>> + Enqueue a previously attached DMABUF object to the buffer >>> queue. >>> + Enqueued DMABUFs will be read from (if output buffer) or >>> written to >>> + (if input buffer) as long as the buffer is enabled. >> >> thanks. > > Cheers, > -Paul thanks. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH v10 6/6] Documentation: iio: Document high-speed DMABUF based API
Hi, On 6/5/24 4:08 AM, Paul Cercueil wrote: > Document the new DMABUF based API. > > Signed-off-by: Paul Cercueil > Signed-off-by: Nuno Sa > > --- > v2: - Explicitly state that the new interface is optional and is > not implemented by all drivers. > - The IOCTLs can now only be called on the buffer FD returned by > IIO_BUFFER_GET_FD_IOCTL. > - Move the page up a bit in the index since it is core stuff and not > driver-specific. > > v3: Update the documentation to reflect the new API. > > v5: Use description lists for the documentation of the three new IOCTLs > instead of abusing subsections. > > v8: Renamed dmabuf_api.rst -> iio_dmabuf_api.rst, and updated index.rst > whose format changed in iio/togreg. > --- > Documentation/iio/iio_dmabuf_api.rst | 54 > Documentation/iio/index.rst | 1 + > 2 files changed, 55 insertions(+) > create mode 100644 Documentation/iio/iio_dmabuf_api.rst > > diff --git a/Documentation/iio/iio_dmabuf_api.rst > b/Documentation/iio/iio_dmabuf_api.rst > new file mode 100644 > index ..1cd6cd51a582 > --- /dev/null > +++ b/Documentation/iio/iio_dmabuf_api.rst > @@ -0,0 +1,54 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +=== > +High-speed DMABUF interface for IIO > +=== > + > +1. Overview > +=== > + > +The Industrial I/O subsystem supports access to buffers through a > +file-based interface, with read() and write() access calls through the > +IIO device's dev node. > + > +It additionally supports a DMABUF based interface, where the userspace > +can attach DMABUF objects (externally created) to a IIO buffer, and I would say/write:to an IIO buffer, > +subsequently use them for data transfers. > + > +A userspace application can then use this interface to share DMABUF > +objects between several interfaces, allowing it to transfer data in a > +zero-copy fashion, for instance between IIO and the USB stack. > + > +The userspace application can also memory-map the DMABUF objects, and > +access the sample data directly. The advantage of doing this vs. the > +read() interface is that it avoids an extra copy of the data between the > +kernel and userspace. This is particularly useful for high-speed devices > +which produce several megabytes or even gigabytes of data per second. > +It does however increase the userspace-kernelspace synchronization > +overhead, as the DMA_BUF_SYNC_START and DMA_BUF_SYNC_END IOCTLs have to > +be used for data integrity. > + > +2. User API > +=== > + > +As part of this interface, three new IOCTLs have been added. These three > +IOCTLs have to be performed on the IIO buffer's file descriptor, > +obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. > + > + ``IIO_BUFFER_DMABUF_ATTACH_IOCTL(int)`` (int fd) ? > +Attach the DMABUF object, identified by its file descriptor, to the > +IIO buffer. Returns zero on success, and a negative errno value on > +error. > + > + ``IIO_BUFFER_DMABUF_DETACH_IOCTL(int)`` ditto. > +Detach the given DMABUF object, identified by its file descriptor, > +from the IIO buffer. Returns zero on success, and a negative errno > +value on error. > + > +Note that closing the IIO buffer's file descriptor will > +automatically detach all previously attached DMABUF objects. > + > + ``IIO_BUFFER_DMABUF_ENQUEUE_IOCTL(struct iio_dmabuf *iio_dmabuf)`` > +Enqueue a previously attached DMABUF object to the buffer queue. > +Enqueued DMABUFs will be read from (if output buffer) or written to > +(if input buffer) as long as the buffer is enabled. thanks. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH v11 07/11] Documentation: core-api: Add math.h macros and functions
Hi, On 5/31/24 10:12 AM, Devarsh Thakkar wrote: > Add documentation for rounding, scaling, absolute value and difference, > 32-bit division related macros and functions exported by math.h header > file. > I don't see any kernel-doc for division functions in this header file. Do some division functions get rendered somehow? Thanks. > Signed-off-by: Devarsh Thakkar > --- > V11: Fix title for math function header > V10: Patch introduced > V1->V9 (No change) > --- > Documentation/core-api/kernel-api.rst | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/core-api/kernel-api.rst > b/Documentation/core-api/kernel-api.rst > index ae92a2571388..7de494e76fa6 100644 > --- a/Documentation/core-api/kernel-api.rst > +++ b/Documentation/core-api/kernel-api.rst > @@ -185,6 +185,12 @@ Division Functions > .. kernel-doc:: lib/math/gcd.c > :export: > > +Rounding, absolute value, division and 32-bit scaling functions > +--- > + > +.. kernel-doc:: include/linux/math.h > + :internal: > + > UUID/GUID > - > -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH][next] drm/amd/display: Fix a handful of spelling mistakes
On 5/31/24 2:32 AM, Colin Ian King wrote: > There are a few spelling mistakes in dml2_printf messages. Fix them. > > Signed-off-by: Colin Ian King Reviewed-by: Randy Dunlap Thanks. > --- > .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 6 +++--- > .../display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git > a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c > > b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c > index 8062144a5a6d..e7e6751f4477 100644 > --- > a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c > +++ > b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c > @@ -5731,7 +5731,7 @@ static bool CalculatePrefetchSchedule(struct > dml2_core_internal_scratch *scratch > dml2_printf("DML: Tvm: %fus - time to fetch vm\n", > s->TimeForFetchingVM); > dml2_printf("DML: Tr0: %fus - time to fetch first row of data > pagetables\n", s->TimeForFetchingRowInVBlank); > dml2_printf("DML: Tsw: %fus = time to fetch enough pixel data > and cursor data to feed the scalers init position and detile\n", > (double)s->LinesToRequestPrefetchPixelData * s->LineTime); > - dml2_printf("DML: To: %fus - time for propogation from scaler > to optc\n", (*p->DSTYAfterScaler + ((double)(*p->DSTXAfterScaler) / > (double)p->myPipe->HTotal)) * s->LineTime); > + dml2_printf("DML: To: %fus - time for propagation from scaler > to optc\n", (*p->DSTYAfterScaler + ((double)(*p->DSTXAfterScaler) / > (double)p->myPipe->HTotal)) * s->LineTime); > dml2_printf("DML: Tvstartup - TSetup - Tcalc - TWait - Tpre - > To > 0\n"); > dml2_printf("DML: Tslack(pre): %fus - time left over in > schedule\n", p->VStartup * s->LineTime - s->TimeForFetchingVM - 2 * > s->TimeForFetchingRowInVBlank - (*p->DSTYAfterScaler + > ((double)(*p->DSTXAfterScaler) / (double)p->myPipe->HTotal)) * s->LineTime - > p->TWait - p->TCalc - *p->TSetup); > dml2_printf("DML: row_bytes = dpte_row_bytes (per_pipe) = > PixelPTEBytesPerRow = : %u\n", p->PixelPTEBytesPerRow); > @@ -8268,7 +8268,7 @@ static bool dml_core_mode_support(struct > dml2_core_calcs_mode_support_ex *in_out > dml2_printf("DML::%s: mode_lib->ms.DCFCLK = %f\n", __func__, > mode_lib->ms.DCFCLK); > dml2_printf("DML::%s: mode_lib->ms.FabricClock = %f\n", __func__, > mode_lib->ms.FabricClock); > dml2_printf("DML::%s: mode_lib->ms.uclk_freq_mhz = %f\n", __func__, > mode_lib->ms.uclk_freq_mhz); > - dml2_printf("DML::%s: urgent latency tolarance = %f\n", __func__, > ((mode_lib->ip.rob_buffer_size_kbytes - mode_lib->ip.pixel_chunk_size_kbytes) > * 1024 / (mode_lib->ms.DCFCLK * mode_lib->soc.return_bus_width_bytes))); > + dml2_printf("DML::%s: urgent latency tolerance = %f\n", __func__, > ((mode_lib->ip.rob_buffer_size_kbytes - mode_lib->ip.pixel_chunk_size_kbytes) > * 1024 / (mode_lib->ms.DCFCLK * mode_lib->soc.return_bus_width_bytes))); > #endif > > mode_lib->ms.support.OutstandingRequestsSupport = true; > @@ -11089,7 +11089,7 @@ static bool dml_core_mode_programming(struct > dml2_core_calcs_mode_programming_ex > if > (display_cfg->plane_descriptors[k].immediate_flip && > mode_lib->mp.ImmediateFlipSupportedForPipe[k] == false) { > mode_lib->mp.ImmediateFlipSupported = > false; > #ifdef __DML_VBA_DEBUG__ > - dml2_printf("DML::%s: Pipe %0d not > supporing iflip!\n", __func__, k); > + dml2_printf("DML::%s: Pipe %0d not > supporting iflip!\n", __func__, k); > #endif > } > } > diff --git > a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c > b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c > index f2e2250d28d3..6eb3fec87ec1 100644 > --- > a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c > +++ > b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c > @@ -1988,7 +1988,7 @@ bool dml2_core_shared_mode_support(struct > dml2_core_calcs_mode_support_ex *in_ou > dml2_printf("DML::%s: mode_li
Re: [PATCH v10 07/11] Documentation: core-api: Add math.h macros and functions
On 5/30/24 10:17 AM, Devarsh Thakkar wrote: > Add documentation for rounding, scaling, absolute value and difference, > 32-bit division related macros and functions exported by math.h header > file. > > Signed-off-by: Devarsh Thakkar > --- > V1->V9 (No change) > V10: Patch introduced > --- > Documentation/core-api/kernel-api.rst | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/core-api/kernel-api.rst > b/Documentation/core-api/kernel-api.rst > index ae92a2571388..fb467783d491 100644 > --- a/Documentation/core-api/kernel-api.rst > +++ b/Documentation/core-api/kernel-api.rst > @@ -185,6 +185,12 @@ Division Functions > .. kernel-doc:: lib/math/gcd.c > :export: > > +Rounding, absolute value, scaling and 32bit division functions 32-bit please. > +-- > + > +.. kernel-doc:: include/linux/math.h > + :internal: > + > UUID/GUID > - > -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] drm/display/dp: fix all kernel-doc warnings
On 5/22/24 2:37 AM, Dmitry Baryshkov wrote: > On Tue, May 21, 2024 at 08:59:06PM -0700, Randy Dunlap wrote: >> Hi Dmitry, >> >> On 5/20/24 3:37 AM, Dmitry Baryshkov wrote: >>> On Wed, May 15, 2024 at 05:26:42PM -0700, Randy Dunlap wrote: >>>> Fix a struct member name in drm_dp_as_sdp. >>>> Add Returns: kernel-doc syntax for 4 functions. >>>> In the Returns: sections, spell "%true" and "%false" consistently. >>>> >>>> Fixes these kernel-doc warnings: >>>> >>>> drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' >>>> not described in 'drm_dp_as_sdp' >>>> drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' >>>> description in 'drm_dp_as_sdp' >>>> drm_dp_helper.h:237: warning: No description found for return value of >>>> 'drm_dp_dsc_sink_supports_format' >>>> drm_dp_helper.h:539: warning: No description found for return value of >>>> 'drm_dp_dpcd_readb' >>>> drm_dp_helper.h:554: warning: No description found for return value of >>>> 'drm_dp_dpcd_writeb' >>>> drm_dp_helper.h:721: warning: No description found for return value of >>>> 'drm_dp_has_quirk' >>>> >>>> Signed-off-by: Randy Dunlap >>>> --- >>>> Cc: David Airlie >>>> Cc: Daniel Vetter >>>> Cc: dri-devel@lists.freedesktop.org >>>> Cc: Maarten Lankhorst >>>> Cc: Maxime Ripard >>>> Cc: Thomas Zimmermann >>>> >>>> include/drm/display/drm_dp_helper.h | 17 + >>>> 1 file changed, 9 insertions(+), 8 deletions(-) >>>> >>>> diff -- a/include/drm/display/drm_dp_helper.h >>>> b/include/drm/display/drm_dp_helper.h >>>> --- a/include/drm/display/drm_dp_helper.h >>>> +++ b/include/drm/display/drm_dp_helper.h >>>> @@ -112,7 +112,7 @@ struct drm_dp_vsc_sdp { >>>> * @target_rr: Target Refresh >>>> * @duration_incr_ms: Successive frame duration increase >>>> * @duration_decr_ms: Successive frame duration decrease >>>> - * @operation_mode: Adaptive Sync Operation Mode >>>> + * @mode: Adaptive Sync Operation Mode >>>> */ >>>> struct drm_dp_as_sdp { >>>>unsigned char sdp_type; >>>> @@ -230,7 +230,8 @@ drm_dp_dsc_sink_max_slice_width(const u8 >>>> * @dsc_dpcd : DSC-capability DPCDs of the sink >>>> * @output_format: output_format which is to be checked >>>> * >>>> - * Returns true if the sink supports DSC with the given output_format, >>>> false otherwise. >>>> + * Returns: %true if the sink supports DSC with the given output_format, >>>> + * %false otherwise. >>>> */ >>>> static inline bool >>>> drm_dp_dsc_sink_supports_format(const u8 >>>> dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format) >>>> @@ -280,8 +281,8 @@ drm_dp_sink_can_do_video_without_timing_ >>>> * backlight features but which require the brightness be set through >>>> PWM, and don't support setting >>>> * the brightness level via the DPCD. >>>> * >>>> - * Returns: %True if @edp_dpcd indicates that VESA backlight controls are >>>> supported, %false >>>> - * otherwise >>>> + * Returns: %true if @edp_dpcd indicates that VESA backlight controls are >>>> + * supported, %false otherwise >>> >>> If you are touching this part, maybe it's better to change 'Returns' to >>> 'Return' as documented by Documentation/doc-guide/kernel-doc.rst ? >>> (the same comment applies to other chunks in the patch, I've trimmed >>> them). >> >> scripts/kernel-doc accepts either spelling, but sure, I can change these. >> Thanks. > > An alternative way would be to fix kernel-doc.rst :-) Yes, I thought of that last night. I'll submit such a change. Thanks. >> >>>> */ >>>> static inline bool >>>> drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE]) >>> >> >> -- >> #Randy >> https://people.kernel.org/tglx/notes-about-netiquette >> https://subspace.kernel.org/etiquette.html > -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] drm/mode: fix all kernel-doc warnings
Hi, On 5/20/24 3:39 AM, Dmitry Baryshkov wrote: > On Wed, May 15, 2024 at 05:26:52PM -0700, Randy Dunlap wrote: >> Add @width and @height descriptions for drm_plane_size_hint >> along with a reference to more info. >> >> Add a short description for drm_mode_closefb. >> >> Change 7 macros not to be marked as kernel-doc notation to prevent >> warnings. >> >> Fixes these kernel-doc warnings: >> >> drm_mode.h:877: warning: Function parameter or struct member 'width' not >> described in 'drm_plane_size_hint' >> drm_mode.h:877: warning: Function parameter or struct member 'height' not >> described in 'drm_plane_size_hint' >> drm_mode.h:969: warning: missing initial short description on line: >> * DRM_MODE_PAGE_FLIP_EVENT >> drm_mode.h:977: warning: missing initial short description on line: >> * DRM_MODE_PAGE_FLIP_ASYNC >> drm_mode.h:998: warning: missing initial short description on line: >> * DRM_MODE_PAGE_FLIP_FLAGS >> drm_mode.h:1108: warning: missing initial short description on line: >> * DRM_MODE_ATOMIC_TEST_ONLY >> drm_mode.h:1118: warning: missing initial short description on line: >> * DRM_MODE_ATOMIC_NONBLOCK >> drm_mode.h:1127: warning: missing initial short description on line: >> * DRM_MODE_ATOMIC_ALLOW_MODESET >> drm_mode.h:1149: warning: missing initial short description on line: >> * DRM_MODE_ATOMIC_FLAGS >> drm_mode.h:1358: warning: missing initial short description on line: >> * struct drm_mode_closefb >> >> Signed-off-by: Randy Dunlap >> --- >> Cc: David Airlie >> Cc: Daniel Vetter >> Cc: dri-devel@lists.freedesktop.org >> Cc: Maarten Lankhorst >> Cc: Maxime Ripard >> Cc: Thomas Zimmermann >> >> include/uapi/drm/drm_mode.h | 21 - >> 1 file changed, 12 insertions(+), 9 deletions(-) >> >> diff -- a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h >> --- a/include/uapi/drm/drm_mode.h >> +++ b/include/uapi/drm/drm_mode.h >> @@ -867,9 +867,12 @@ struct drm_color_lut { >> >> /** >> * struct drm_plane_size_hint - Plane size hints >> + * @width: recommended plane width (no scaling) >> + * @height: recommended plane height (no scaling) >> * >> * The plane SIZE_HINTS property blob contains an >> - * array of struct drm_plane_size_hint. >> + * array of struct drm_plane_size_hint as described in >> + * "DOC: standard plane properties". >> */ >> struct drm_plane_size_hint { >> __u16 width; >> @@ -962,7 +965,7 @@ struct hdr_output_metadata { >> }; >> }; >> >> -/** >> +/* >> * DRM_MODE_PAGE_FLIP_EVENT > > What about convering to the proper kerneldoc instead of dropping the > kerneldoc part? If someone with knowledge of these macros can provide the text that should be there, I can add that info. >> * >> * Request that the kernel sends back a vblank event (see >> @@ -970,7 +973,7 @@ struct hdr_output_metadata { >> * page-flip is done. >> */ >> #define DRM_MODE_PAGE_FLIP_EVENT 0x01 >> -/** >> +/* >> * DRM_MODE_PAGE_FLIP_ASYNC >> * >> * Request that the page-flip is performed as soon as possible, ie. with no >> @@ -991,7 +994,7 @@ struct hdr_output_metadata { >> #define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8 >> #define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \ >> DRM_MODE_PAGE_FLIP_TARGET_RELATIVE) >> -/** >> +/* >> * DRM_MODE_PAGE_FLIP_FLAGS >> * >> * Bitmask of flags suitable for _mode_crtc_page_flip_target.flags. >> @@ -1101,7 +1104,7 @@ struct drm_mode_destroy_dumb { >> __u32 handle; >> }; >> >> -/** >> +/* >> * DRM_MODE_ATOMIC_TEST_ONLY >> * >> * Do not apply the atomic commit, instead check whether the hardware >> supports >> @@ -,7 +1114,7 @@ struct drm_mode_destroy_dumb { >> * commits. >> */ >> #define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 >> -/** >> +/* >> * DRM_MODE_ATOMIC_NONBLOCK >> * >> * Do not block while applying the atomic commit. The _IOCTL_MODE_ATOMIC >> @@ -1120,7 +1123,7 @@ struct drm_mode_destroy_dumb { >> * applied before retuning. >> */ >> #define DRM_MODE_ATOMIC_NONBLOCK 0x0200 >> -/** >> +/* >> * DRM_MODE_ATOMIC_ALLOW_MODESET >> * >> * Allow the update to result in temporary or transient visible artifacts >> while >> @@ -1142,7 +1145,7 @@ struct drm_mode_destroy_dumb { >> */ >> #define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 >> >> -/** >> +/* >> * DRM_MODE_ATOMIC_FLAGS >> * >> * Bitfield of flags accepted by the _IOCTL_MODE_ATOMIC IOCTL in >> @@ -1352,7 +1355,7 @@ struct drm_mode_rect { >> }; >> >> /** >> - * struct drm_mode_closefb >> + * struct drm_mode_closefb - ioctl struct to close a framebuffer >> * @fb_id: Framebuffer ID. >> * @pad: Must be zero. >> */ > Thanks. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] drm/display/dp: fix all kernel-doc warnings
Hi Dmitry, On 5/20/24 3:37 AM, Dmitry Baryshkov wrote: > On Wed, May 15, 2024 at 05:26:42PM -0700, Randy Dunlap wrote: >> Fix a struct member name in drm_dp_as_sdp. >> Add Returns: kernel-doc syntax for 4 functions. >> In the Returns: sections, spell "%true" and "%false" consistently. >> >> Fixes these kernel-doc warnings: >> >> drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' not >> described in 'drm_dp_as_sdp' >> drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' >> description in 'drm_dp_as_sdp' >> drm_dp_helper.h:237: warning: No description found for return value of >> 'drm_dp_dsc_sink_supports_format' >> drm_dp_helper.h:539: warning: No description found for return value of >> 'drm_dp_dpcd_readb' >> drm_dp_helper.h:554: warning: No description found for return value of >> 'drm_dp_dpcd_writeb' >> drm_dp_helper.h:721: warning: No description found for return value of >> 'drm_dp_has_quirk' >> >> Signed-off-by: Randy Dunlap >> --- >> Cc: David Airlie >> Cc: Daniel Vetter >> Cc: dri-devel@lists.freedesktop.org >> Cc: Maarten Lankhorst >> Cc: Maxime Ripard >> Cc: Thomas Zimmermann >> >> include/drm/display/drm_dp_helper.h | 17 + >> 1 file changed, 9 insertions(+), 8 deletions(-) >> >> diff -- a/include/drm/display/drm_dp_helper.h >> b/include/drm/display/drm_dp_helper.h >> --- a/include/drm/display/drm_dp_helper.h >> +++ b/include/drm/display/drm_dp_helper.h >> @@ -112,7 +112,7 @@ struct drm_dp_vsc_sdp { >> * @target_rr: Target Refresh >> * @duration_incr_ms: Successive frame duration increase >> * @duration_decr_ms: Successive frame duration decrease >> - * @operation_mode: Adaptive Sync Operation Mode >> + * @mode: Adaptive Sync Operation Mode >> */ >> struct drm_dp_as_sdp { >> unsigned char sdp_type; >> @@ -230,7 +230,8 @@ drm_dp_dsc_sink_max_slice_width(const u8 >> * @dsc_dpcd : DSC-capability DPCDs of the sink >> * @output_format: output_format which is to be checked >> * >> - * Returns true if the sink supports DSC with the given output_format, >> false otherwise. >> + * Returns: %true if the sink supports DSC with the given output_format, >> + * %false otherwise. >> */ >> static inline bool >> drm_dp_dsc_sink_supports_format(const u8 >> dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format) >> @@ -280,8 +281,8 @@ drm_dp_sink_can_do_video_without_timing_ >> * backlight features but which require the brightness be set through PWM, >> and don't support setting >> * the brightness level via the DPCD. >> * >> - * Returns: %True if @edp_dpcd indicates that VESA backlight controls are >> supported, %false >> - * otherwise >> + * Returns: %true if @edp_dpcd indicates that VESA backlight controls are >> + * supported, %false otherwise > > If you are touching this part, maybe it's better to change 'Returns' to > 'Return' as documented by Documentation/doc-guide/kernel-doc.rst ? > (the same comment applies to other chunks in the patch, I've trimmed > them). scripts/kernel-doc accepts either spelling, but sure, I can change these. Thanks. >> */ >> static inline bool >> drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE]) > -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
[PATCH] drm/mode: fix all kernel-doc warnings
Add @width and @height descriptions for drm_plane_size_hint along with a reference to more info. Add a short description for drm_mode_closefb. Change 7 macros not to be marked as kernel-doc notation to prevent warnings. Fixes these kernel-doc warnings: drm_mode.h:877: warning: Function parameter or struct member 'width' not described in 'drm_plane_size_hint' drm_mode.h:877: warning: Function parameter or struct member 'height' not described in 'drm_plane_size_hint' drm_mode.h:969: warning: missing initial short description on line: * DRM_MODE_PAGE_FLIP_EVENT drm_mode.h:977: warning: missing initial short description on line: * DRM_MODE_PAGE_FLIP_ASYNC drm_mode.h:998: warning: missing initial short description on line: * DRM_MODE_PAGE_FLIP_FLAGS drm_mode.h:1108: warning: missing initial short description on line: * DRM_MODE_ATOMIC_TEST_ONLY drm_mode.h:1118: warning: missing initial short description on line: * DRM_MODE_ATOMIC_NONBLOCK drm_mode.h:1127: warning: missing initial short description on line: * DRM_MODE_ATOMIC_ALLOW_MODESET drm_mode.h:1149: warning: missing initial short description on line: * DRM_MODE_ATOMIC_FLAGS drm_mode.h:1358: warning: missing initial short description on line: * struct drm_mode_closefb Signed-off-by: Randy Dunlap --- Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann include/uapi/drm/drm_mode.h | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff -- a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -867,9 +867,12 @@ struct drm_color_lut { /** * struct drm_plane_size_hint - Plane size hints + * @width: recommended plane width (no scaling) + * @height: recommended plane height (no scaling) * * The plane SIZE_HINTS property blob contains an - * array of struct drm_plane_size_hint. + * array of struct drm_plane_size_hint as described in + * "DOC: standard plane properties". */ struct drm_plane_size_hint { __u16 width; @@ -962,7 +965,7 @@ struct hdr_output_metadata { }; }; -/** +/* * DRM_MODE_PAGE_FLIP_EVENT * * Request that the kernel sends back a vblank event (see @@ -970,7 +973,7 @@ struct hdr_output_metadata { * page-flip is done. */ #define DRM_MODE_PAGE_FLIP_EVENT 0x01 -/** +/* * DRM_MODE_PAGE_FLIP_ASYNC * * Request that the page-flip is performed as soon as possible, ie. with no @@ -991,7 +994,7 @@ struct hdr_output_metadata { #define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8 #define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \ DRM_MODE_PAGE_FLIP_TARGET_RELATIVE) -/** +/* * DRM_MODE_PAGE_FLIP_FLAGS * * Bitmask of flags suitable for _mode_crtc_page_flip_target.flags. @@ -1101,7 +1104,7 @@ struct drm_mode_destroy_dumb { __u32 handle; }; -/** +/* * DRM_MODE_ATOMIC_TEST_ONLY * * Do not apply the atomic commit, instead check whether the hardware supports @@ -,7 +1114,7 @@ struct drm_mode_destroy_dumb { * commits. */ #define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 -/** +/* * DRM_MODE_ATOMIC_NONBLOCK * * Do not block while applying the atomic commit. The _IOCTL_MODE_ATOMIC @@ -1120,7 +1123,7 @@ struct drm_mode_destroy_dumb { * applied before retuning. */ #define DRM_MODE_ATOMIC_NONBLOCK 0x0200 -/** +/* * DRM_MODE_ATOMIC_ALLOW_MODESET * * Allow the update to result in temporary or transient visible artifacts while @@ -1142,7 +1145,7 @@ struct drm_mode_destroy_dumb { */ #define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 -/** +/* * DRM_MODE_ATOMIC_FLAGS * * Bitfield of flags accepted by the _IOCTL_MODE_ATOMIC IOCTL in @@ -1352,7 +1355,7 @@ struct drm_mode_rect { }; /** - * struct drm_mode_closefb + * struct drm_mode_closefb - ioctl struct to close a framebuffer * @fb_id: Framebuffer ID. * @pad: Must be zero. */
[PATCH] drm/display/dp: fix all kernel-doc warnings
Fix a struct member name in drm_dp_as_sdp. Add Returns: kernel-doc syntax for 4 functions. In the Returns: sections, spell "%true" and "%false" consistently. Fixes these kernel-doc warnings: drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' not described in 'drm_dp_as_sdp' drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' description in 'drm_dp_as_sdp' drm_dp_helper.h:237: warning: No description found for return value of 'drm_dp_dsc_sink_supports_format' drm_dp_helper.h:539: warning: No description found for return value of 'drm_dp_dpcd_readb' drm_dp_helper.h:554: warning: No description found for return value of 'drm_dp_dpcd_writeb' drm_dp_helper.h:721: warning: No description found for return value of 'drm_dp_has_quirk' Signed-off-by: Randy Dunlap --- Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann include/drm/display/drm_dp_helper.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff -- a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h --- a/include/drm/display/drm_dp_helper.h +++ b/include/drm/display/drm_dp_helper.h @@ -112,7 +112,7 @@ struct drm_dp_vsc_sdp { * @target_rr: Target Refresh * @duration_incr_ms: Successive frame duration increase * @duration_decr_ms: Successive frame duration decrease - * @operation_mode: Adaptive Sync Operation Mode + * @mode: Adaptive Sync Operation Mode */ struct drm_dp_as_sdp { unsigned char sdp_type; @@ -230,7 +230,8 @@ drm_dp_dsc_sink_max_slice_width(const u8 * @dsc_dpcd : DSC-capability DPCDs of the sink * @output_format: output_format which is to be checked * - * Returns true if the sink supports DSC with the given output_format, false otherwise. + * Returns: %true if the sink supports DSC with the given output_format, + * %false otherwise. */ static inline bool drm_dp_dsc_sink_supports_format(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format) @@ -280,8 +281,8 @@ drm_dp_sink_can_do_video_without_timing_ * backlight features but which require the brightness be set through PWM, and don't support setting * the brightness level via the DPCD. * - * Returns: %True if @edp_dpcd indicates that VESA backlight controls are supported, %false - * otherwise + * Returns: %true if @edp_dpcd indicates that VESA backlight controls are + * supported, %false otherwise */ static inline bool drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE]) @@ -295,7 +296,7 @@ drm_edp_backlight_supported(const u8 edp * * Determine if the provided link rate is an UHBR rate. * - * Returns: %True if @link_rate is an UHBR rate. + * Returns: %true if @link_rate is an UHBR rate. */ static inline bool drm_dp_is_uhbr_rate(int link_rate) { @@ -531,7 +532,7 @@ ssize_t drm_dp_dpcd_write(struct drm_dp_ * @offset: address of the register to read * @valuep: location where the value of the register will be stored * - * Returns the number of bytes transferred (1) on success, or a negative + * Returns: the number of bytes transferred (1) on success, or a negative * error code on failure. */ static inline ssize_t drm_dp_dpcd_readb(struct drm_dp_aux *aux, @@ -546,7 +547,7 @@ static inline ssize_t drm_dp_dpcd_readb( * @offset: address of the register to write * @value: value to write to the register * - * Returns the number of bytes transferred (1) on success, or a negative + * Returns: the number of bytes transferred (1) on success, or a negative * error code on failure. */ static inline ssize_t drm_dp_dpcd_writeb(struct drm_dp_aux *aux, @@ -714,7 +715,7 @@ enum drm_dp_quirk { * @desc: Device descriptor filled by drm_dp_read_desc() * @quirk: Quirk to query for * - * Return true if DP device identified by @desc has @quirk. + * Returns: %true if DP device identified by @desc has @quirk. */ static inline bool drm_dp_has_quirk(const struct drm_dp_desc *desc, enum drm_dp_quirk quirk)
Re: [PATCH] drm: Fix no_vblank field references in documentation
On 4/16/24 2:02 PM, Randy Dunlap wrote: > > > On 4/16/24 2:00 PM, Marijn Suijten wrote: >> Hi Randy, >> >> [..] >> >>> Do you see differences in the generated html for these changes? >> >> I have not yet generated the HTML locally to test this patch, but will >> surely do >> if that's a requirement. >> >>> " somestruct" and "" should both be OK AFAIK, although >>> Documentation/doc-guide/kernel-doc.rst seems to say that using >>> " somestruct" is preferred. >> >> Keep in mind that this patch is about field/member references. Quoting the >> relevant paragraph under "Highlights and cross-references": >> >> ``_name->member`` or ``_name.member`` >> Structure or union member reference. The cross-reference will be to the >> struct >> or union definition, not the member directly. >> >> This lacks the struct tag entirely, and observation shows that links with >> them >> don't highlight correctly (hence this patch) while member links without >> struct >> tag are clickable and have an anchor link to their parent struct. > > Alrigthy. Thank you. > That means: Reviewed-by: Randy Dunlap Thanks. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] drm: Fix no_vblank field references in documentation
On 4/16/24 2:00 PM, Marijn Suijten wrote: > Hi Randy, > > [..] > >> Do you see differences in the generated html for these changes? > > I have not yet generated the HTML locally to test this patch, but will surely > do > if that's a requirement. > >> " somestruct" and "" should both be OK AFAIK, although >> Documentation/doc-guide/kernel-doc.rst seems to say that using >> " somestruct" is preferred. > > Keep in mind that this patch is about field/member references. Quoting the > relevant paragraph under "Highlights and cross-references": > > ``_name->member`` or ``_name.member`` > Structure or union member reference. The cross-reference will be to the > struct > or union definition, not the member directly. > > This lacks the struct tag entirely, and observation shows that links with them > don't highlight correctly (hence this patch) while member links without struct > tag are clickable and have an anchor link to their parent struct. Alrigthy. Thank you. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] drm: Fix no_vblank field references in documentation
Hi, On 4/16/24 12:29 PM, Marijn Suijten wrote: > Browsing the DRM documentation shows that drm_crtc_state.no_vblank > is not turned into a reference to the no_vblank field, but rather a > reference to `struct drm_crtc_state`. The only difference with other > field references is that the struct name is prefixed by the literal > `struct` tag, despite also already having a `&` reference prefix in two > of the three cases. Remove the `struct` prefix to turn these references > into proper links to the designated field. > > Fixes: 7beb691f1e6f ("drm: Initialize struct drm_crtc_state.no_vblank from > device settings") > Signed-off-by: Marijn Suijten > --- > Note that a simple regex like " \w+\.\w+" shows that there are > only a handful of violators, most of them inside DRM files. Let me know > if you'd like a v2 that addresses all of them in one go (in separate > patches or one combined change)? > > Kind regards, > Marijn > --- > drivers/gpu/drm/drm_vblank.c| 2 +- > include/drm/drm_crtc.h | 2 +- > include/drm/drm_simple_kms_helper.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c > index 702a12bc93bd..45504732f98e 100644 > --- a/drivers/gpu/drm/drm_vblank.c > +++ b/drivers/gpu/drm/drm_vblank.c > @@ -140,7 +140,7 @@ > * must not call drm_vblank_init(). For such drivers, atomic helpers will > * automatically generate fake vblank events as part of the display update. > * This functionality also can be controlled by the driver by enabling and > - * disabling struct drm_crtc_state.no_vblank. > + * disabling _crtc_state.no_vblank. > */ > > /* Retry timestamp calculation up to 3 times to satisfy > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > index 8b48a1974da3..eb75d0aec170 100644 > --- a/include/drm/drm_crtc.h > +++ b/include/drm/drm_crtc.h > @@ -342,7 +342,7 @@ struct drm_crtc_state { >*that case. >* >* For very simple hardware without VBLANK interrupt, enabling > - * drm_crtc_state.no_vblank makes DRM's atomic commit helpers > + * _crtc_state.no_vblank makes DRM's atomic commit helpers >* send a fake VBLANK event at the end of the display update after all >* hardware changes have been applied. See >* drm_atomic_helper_fake_vblank(). > diff --git a/include/drm/drm_simple_kms_helper.h > b/include/drm/drm_simple_kms_helper.h > index b2486d073763..6e64d91819e7 100644 > --- a/include/drm/drm_simple_kms_helper.h > +++ b/include/drm/drm_simple_kms_helper.h > @@ -102,7 +102,7 @@ struct drm_simple_display_pipe_funcs { >* drm_crtc_arm_vblank_event(), when the driver supports vblank >* interrupt handling, or drm_crtc_send_vblank_event() for more >* complex case. In case the hardware lacks vblank support entirely, > - * drivers can set drm_crtc_state.no_vblank in > + * drivers can set _crtc_state.no_vblank in >* drm_simple_display_pipe_funcs.check and let DRM's >* atomic helper fake a vblank event. >*/ > > --- > base-commit: 6bd343537461b57f3efe5dfc5fc193a232dfef1e > change-id: 20240416-drm-no_vblank-kdoc-link-fea1b53008a3 Do you see differences in the generated html for these changes? " somestruct" and "" should both be OK AFAIK, although Documentation/doc-guide/kernel-doc.rst seems to say that using " somestruct" is preferred. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] treewide: Fix common grammar mistake "the the"
On 4/11/24 8:04 AM, Thorsten Blum wrote: > Use `find . -type f -exec sed -i 's/\/the/g' {} +` to find all > occurrences of "the the" and replace them with a single "the". > > Changes only comments and documentation - no code changes. > > Signed-off-by: Thorsten Blum > --- > Documentation/trace/histogram.rst | 2 +- > arch/arm/Kconfig | 4 ++-- > arch/arm/include/asm/unwind.h | 2 +- > arch/arm64/Kconfig| 2 +- > arch/arm64/kernel/entry-ftrace.S | 2 +- > arch/s390/kernel/perf_cpum_sf.c | 2 +- > arch/s390/kernel/sthyi.c | 2 +- > drivers/accessibility/speakup/speakup_soft.c | 2 +- > drivers/gpu/drm/i915/display/intel_crt.c | 2 +- > drivers/gpu/drm/i915/i915_request.c | 2 +- > drivers/mailbox/Kconfig | 2 +- > drivers/net/wireless/intel/iwlwifi/fw/api/tx.h| 4 ++-- > drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 2 +- > drivers/scsi/bfa/bfa_fcs_rport.c | 2 +- > drivers/scsi/fcoe/fcoe_ctlr.c | 2 +- > drivers/scsi/isci/host.h | 2 +- > drivers/scsi/isci/remote_device.h | 2 +- > drivers/scsi/isci/remote_node_context.h | 2 +- > drivers/scsi/isci/task.c | 2 +- > fs/afs/flock.c| 2 +- > fs/ecryptfs/keystore.c| 2 +- > fs/netfs/direct_read.c| 2 +- > fs/netfs/direct_write.c | 2 +- > fs/overlayfs/super.c | 2 +- > include/uapi/asm-generic/fcntl.h | 2 +- > io_uring/kbuf.c | 2 +- > lib/zstd/common/fse_decompress.c | 2 +- > lib/zstd/decompress/zstd_decompress_block.c | 2 +- > scripts/coccinelle/misc/badty.cocci | 2 +- > tools/perf/Documentation/perf-diff.txt| 2 +- > 30 files changed, 32 insertions(+), 32 deletions(-) > Reviewed-by: Randy Dunlap Thanks. -- #Randy
Re: [PATCH] fbdev/sh7760fb: allow modular build
Hi, Will someone be merging this patch? thanks. On 2/10/24 1:31 AM, John Paul Adrian Glaubitz wrote: > On Fri, 2024-02-09 at 21:39 -0800, Randy Dunlap wrote: >> There is no reason to prohibit sh7760fb from being built as a >> loadable module as suggested by Geert, so change the config symbol >> from bool to tristate to allow that and change the FB dependency as >> needed. >> >> Fixes: f75f71b2c418 ("fbdev/sh7760fb: Depend on FB=y") >> Suggested-by: Geert Uytterhoeven >> Signed-off-by: Randy Dunlap >> Cc: Thomas Zimmermann >> Cc: Javier Martinez Canillas >> Cc: John Paul Adrian Glaubitz >> Cc: Sam Ravnborg >> Cc: Helge Deller >> Cc: linux-fb...@vger.kernel.org >> Cc: dri-devel@lists.freedesktop.org >> --- >> drivers/video/fbdev/Kconfig |4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig >> --- a/drivers/video/fbdev/Kconfig >> +++ b/drivers/video/fbdev/Kconfig >> @@ -1645,8 +1645,8 @@ config FB_COBALT >> select FB_IOMEM_HELPERS >> >> config FB_SH7760 >> -bool "SH7760/SH7763/SH7720/SH7721 LCDC support" >> -depends on FB=y && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \ >> +tristate "SH7760/SH7763/SH7720/SH7721 LCDC support" >> +depends on FB && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \ >> || CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721) >> select FB_IOMEM_HELPERS >> help > > Acked-by: John Paul Adrian Glaubitz > > Adrian > -- #Randy
Re: [RFC PATCH net-next v7 13/14] net: add devmem TCP documentation
Hi, On 3/26/24 15:50, Mina Almasry wrote: > Add documentation outlining the usage and details of devmem TCP. > > Signed-off-by: Mina Almasry > > --- > > v7: > - Applied docs suggestions (Jakub). > > v2: > > - Missing spdx (simon) > - add to index.rst (simon) > > --- > Documentation/networking/devmem.rst | 256 > Documentation/networking/index.rst | 1 + > 2 files changed, 257 insertions(+) > create mode 100644 Documentation/networking/devmem.rst > > diff --git a/Documentation/networking/devmem.rst > b/Documentation/networking/devmem.rst > new file mode 100644 > index ..b0899e8e9e83 > --- /dev/null > +++ b/Documentation/networking/devmem.rst > @@ -0,0 +1,256 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > += > +Device Memory TCP > += > + > + > +Intro > += > + > +Device memory TCP (devmem TCP) enables receiving data directly into device > +memory (dmabuf). The feature is currently implemented for TCP sockets. > + > + > +Opportunity > +--- > + > +A large number of data transfers have device memory as the source and/or > +destination. Accelerators drastically increased the prevalence of such > +transfers. Some examples include: > + > +- Distributed training, where ML accelerators, such as GPUs on different > hosts, > + exchange data. > + > +- Distributed raw block storage applications transfer large amounts of data > with > + remote SSDs, much of this data does not require host processing. SSDs. Much > + > +Typically the Device-to-Device data transfers the network are implemented as > the in the network ? > +following low level operations: Device-to-Host copy, Host-to-Host network low-level > +transfer, and Host-to-Device copy. > + > +The flow involving host copies is suboptimal, especially for bulk data > transfers, > +and can put significant strains on system resources such as host memory > +bandwidth and PCIe bandwidth. > + > +Devmem TCP optimizes this use case by implementing socket APIs that enable > +the user to receive incoming network packets directly into device memory. > + > +Packet payloads go directly from the NIC to device memory. > + > +Packet headers go to host memory and are processed by the TCP/IP stack > +normally. The NIC must support header split to achieve this. > + > +Advantages: > + > +- Alleviate host memory bandwidth pressure, compared to existing > + network-transfer + device-copy semantics. > + > +- Alleviate PCIe bandwidth pressure, by limiting data transfer to the lowest > + level of the PCIe tree, compared to traditional path which sends data > through to the > + the root complex. > + > + > +More Info > +- > + > + slides, video > +https://netdevconf.org/0x17/sessions/talk/device-memory-tcp.html > + > + patchset > +[RFC PATCH v6 00/12] Device Memory TCP > + > https://lore.kernel.org/netdev/20240305020153.2787423-1-almasrym...@google.com/ > + > + > +Interface > += > + > +Example > +--- > + > +tools/testing/selftests/net/ncdevmem.c:do_server shows an example of setting > up > +the RX path of this API. > + > +NIC Setup > +- > + > +Header split, flow steering, & RSS are required features for devmem TCP. > + > +Header split is used to split incoming packets into a header buffer in host > +memory, and a payload buffer in device memory. > + > +Flow steering & RSS are used to ensure that only flows targeting devmem land > on> +RX queue bound to devmem. an RX queue ? > + > +Enable header split & flow steering:: > + > + # enable header split > + ethtool -G eth1 tcp-data-split on > + > + > + # enable flow steering > + ethtool -K eth1 ntuple on > + > +Configure RSS to steer all traffic away from the target RX queue (queue 15 in > +this example):: > + > + ethtool --set-rxfh-indir eth1 equal 15 > + > + > +The user must bind a dmabuf to any number of RX queues on a given NIC using > +netlink API:: the netlink API:: > + > + /* Bind dmabuf to NIC RX queue 15 */ > + struct netdev_queue *queues; > + queues = malloc(sizeof(*queues) * 1); > + > + queues[0]._present.type = 1; > + queues[0]._present.idx = 1; > + queues[0].type = NETDEV_RX_QUEUE_TYPE_RX; > + queues[0].idx = 15; > + > + *ys = ynl_sock_create(_netdev_family, ); > + > + req = netdev_bind_rx_req_alloc(); > + netdev_bind_rx_req_set_ifindex(req, 1 /* ifindex */); > + netdev_bind_rx_req_set_dmabuf_fd(req, dmabuf_fd); > + __netdev_bind_rx_req_set_queues(req, queues, n_queue_index); > + > + rsp = netdev_bind_rx(*ys, req); > + > + dmabuf_id = rsp->dmabuf_id; > + > + > +The netlink API returns a dmabuf_id: a unique ID that refers to this dmabuf > +that has been bound. > + > +Socket Setup > + > + > +The socket must be flow steering to the dmabuf bound RX queue::
Re: [PATCH v2 1/8] drm: xlnx: Fix kerneldoc
On 3/19/24 22:42, Tomi Valkeinen wrote: > On 20/03/2024 00:51, Sean Anderson wrote: >> Fix a few errors in the kerneldoc. Mostly this addresses missing/renamed >> members. >> >> Signed-off-by: Sean Anderson >> --- >> >> Changes in v2: >> - New >> >> drivers/gpu/drm/xlnx/zynqmp_disp.c | 6 +++--- >> drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 1 + >> drivers/gpu/drm/xlnx/zynqmp_kms.h | 4 ++-- >> 3 files changed, 6 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c >> b/drivers/gpu/drm/xlnx/zynqmp_disp.c >> index 407bc07cec69..f79bf3fb8110 100644 >> --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c >> +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c >> @@ -128,9 +128,9 @@ struct zynqmp_disp_layer { >> * struct zynqmp_disp - Display controller >> * @dev: Device structure >> * @dpsub: Display subsystem >> - * @blend.base: Register I/O base address for the blender >> - * @avbuf.base: Register I/O base address for the audio/video buffer manager >> - * @audio.base: Registers I/O base address for the audio mixer >> + * @blend: Register I/O base address for the blender >> + * @avbuf: Register I/O base address for the audio/video buffer manager >> + * @audio: Registers I/O base address for the audio mixer > > Afaics, the kernel doc guide: > > https://docs.kernel.org/doc-guide/kernel-doc.html#nested-structs-unions > > says that the current version is correct. Or is the issue that while, say, > 'base' is documented, 'blend' was not? Hi, I would do it more like so: --- drivers/gpu/drm/xlnx/zynqmp_disp.c |3 +++ 1 file changed, 3 insertions(+) diff -- a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -128,8 +128,11 @@ struct zynqmp_disp_layer { * struct zynqmp_disp - Display controller * @dev: Device structure * @dpsub: Display subsystem + * @blend: blender iomem info * @blend.base: Register I/O base address for the blender + * @avbuf: audio/video buffer iomem info * @avbuf.base: Register I/O base address for the audio/video buffer manager + * @audio: audio mixer iomem info * @audio.base: Registers I/O base address for the audio mixer * @layers: Layers (planes) */ but in my testing, Sean's way or my way result in no warning/errors. -- #Randy
Re: [PATCH v5 11/16] drm/vkms: Add YUV support
Hi, On 3/13/24 10:45, Louis Chauvet wrote: > From: Arthur Grillo > > > Signed-off-by: Arthur Grillo > [Louis Chauvet: > - Adapted Arthur's work > - Implemented the read_line_t callbacks for yuv > - add struct conversion_matrix > - remove struct pixel_yuv_u8 > - update the commit message > - Merge the modifications from Arthur] > Signed-off-by: Louis Chauvet > --- > drivers/gpu/drm/vkms/vkms_drv.h | 22 ++ > drivers/gpu/drm/vkms/vkms_formats.c | 431 > > drivers/gpu/drm/vkms/vkms_formats.h | 4 + > drivers/gpu/drm/vkms/vkms_plane.c | 17 +- > 4 files changed, 473 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h > index 23e1d247468d..f3116084de5a 100644 > --- a/drivers/gpu/drm/vkms/vkms_drv.h > +++ b/drivers/gpu/drm/vkms/vkms_drv.h > @@ -99,6 +99,27 @@ typedef void (*pixel_read_line_t)(const struct > vkms_plane_state *plane, int x_st > int y_start, enum pixel_read_direction > direction, int count, > struct pixel_argb_u16 out_pixel[]); > > +/** > + * CONVERSION_MATRIX_FLOAT_DEPTH - Number of digits after the point for > conversion matrix values This should be + * define CONVERSION_MATRIX_FLOAT_DEPTH - Number of digits after the point for conversion matrix values to conform to kernel-doc format. > + */ > +#define CONVERSION_MATRIX_FLOAT_DEPTH 32 > + > diff --git a/drivers/gpu/drm/vkms/vkms_formats.c > b/drivers/gpu/drm/vkms/vkms_formats.c > index 1449a0e6c706..edbf4b321b91 100644 > --- a/drivers/gpu/drm/vkms/vkms_formats.c > +++ b/drivers/gpu/drm/vkms/vkms_formats.c > +/** > + * get_conversion_matrix_to_argb_u16() - Retrieve the correct yuv to rgb > conversion matrix for a > + * given encoding and range. > + * > + * If the matrix is not found, return a null pointer. In all other cases, it > return a simple > + * diagonal matrix, which act as a "no-op". > + * > + * @format: DRM_FORMAT_* value for which to obtain a conversion function > (see [drm_fourcc.h]) > + * @encoding: DRM_COLOR_* value for which to obtain a conversion matrix > + * @range: DRM_COLOR_*_RANGE value for which to obtain a conversion matrix > + */ > +struct conversion_matrix * > +get_conversion_matrix_to_argb_u16(u32 format, enum drm_color_encoding > encoding, > + enum drm_color_range range) > +{ > + static struct conversion_matrix no_operation = { > + .matrix = { > + { 4294967296, 0, 0, }, > + { 0, 4294967296, 0, }, > + { 0, 0, 4294967296, }, > + }, > + .y_offset = 0, > + }; > + > + /* > + * Those matrixies were generated using the colour python framework matrices > + * > + * Below are the function calls used to generate eac matrix, go to each > + * > https://colour.readthedocs.io/en/develop/generated/colour.matrix_YCbCr.html > + * for more info: > + * > + * numpy.around(colour.matrix_YCbCr(K=colour.WEIGHTS_YCBCR["ITU-R > BT.601"], > + * is_legal = False, > + * bits = 8) * 2**32).astype(int) > + */ > + > /** Please convert this comment to kernel-doc format or just use "/*" to begin the comment. > * Retrieve the correct write_pixel function for a specific format. > * If the format is not supported by VKMS a warn is emitted and a dummy > "don't do anything" > diff --git a/drivers/gpu/drm/vkms/vkms_plane.c > b/drivers/gpu/drm/vkms/vkms_plane.c > index 8875bed76410..987dd2b686a8 100644 > --- a/drivers/gpu/drm/vkms/vkms_plane.c > +++ b/drivers/gpu/drm/vkms/vkms_plane.c thanks. -- #Randy
Re: [PATCH v5 05/16] drm/vkms: Add dummy pixel_read/pixel_write callbacks to avoid NULL pointers
On 3/13/24 10:44, Louis Chauvet wrote: > Introduce two callbacks which does nothing. They are used in replacement > of NULL and it avoid kernel OOPS if this NULL is called. > > If those callback are used, it means that there is a mismatch between > what formats are announced by atomic_check and what is realy supported by > atomic_update. > > Signed-off-by: Louis Chauvet > --- > drivers/gpu/drm/vkms/vkms_formats.c | 43 > +++-- > 1 file changed, 37 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/vkms/vkms_formats.c > b/drivers/gpu/drm/vkms/vkms_formats.c > index 55a4365d21a4..b57d85b8b935 100644 > --- a/drivers/gpu/drm/vkms/vkms_formats.c > +++ b/drivers/gpu/drm/vkms/vkms_formats.c > @@ -261,8 +286,8 @@ void vkms_writeback_row(struct vkms_writeback_job *wb, > > /** Please mak this comment conform to kernel-doc format or don't use "/**" to begin the comment. > * Retrieve the correct read_pixel function for a specific format. > - * The returned pointer is NULL for unsupported pixel formats. The caller > must ensure that the > - * pointer is valid before using it in a vkms_plane_state. > + * If the format is not supported by VKMS a warn is emitted and a dummy > "always read black" > + * function is returned. > * > * @format: DRM_FORMAT_* value for which to obtain a conversion function > (see [drm_fourcc.h]) > */ > @@ -285,18 +310,21 @@ pixel_read_t get_pixel_read_function(u32 format) >* format must: >* - Be listed in vkms_formats in vkms_plane.c >* - Have a pixel_read callback defined here > + * > + * To avoid kernel crash, a dummy "always read black" function > is used. It means > + * that during the composition, this plane will always be black. >*/ > WARN(true, >"Pixel format %p4cc is not supported by VKMS planes. This > is a kernel bug, atomic check must forbid this configuration.\n", >); > - return (pixel_read_t)NULL; > + return _to_argb_u16; > } > } > > /** Same here. > * Retrieve the correct write_pixel function for a specific format. > - * The returned pointer is NULL for unsupported pixel formats. The caller > must ensure that the > - * pointer is valid before using it in a vkms_writeback_job. > + * If the format is not supported by VKMS a warn is emitted and a dummy > "don't do anything" > + * function is returned. > * > * @format: DRM_FORMAT_* value for which to obtain a conversion function > (see [drm_fourcc.h]) > */ thanks. -- #Randy
Re: [PATCH v5 03/16] drm/vkms: write/update the documentation for pixel conversion and pixel write functions
Hi, On 3/13/24 10:44, Louis Chauvet wrote: > Add some documentation on pixel conversion functions. > Update of outdated comments for pixel_write functions. > > Signed-off-by: Louis Chauvet > --- > drivers/gpu/drm/vkms/vkms_composer.c | 7 > drivers/gpu/drm/vkms/vkms_drv.h | 13 > drivers/gpu/drm/vkms/vkms_formats.c | 62 > ++-- > 3 files changed, 73 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/vkms/vkms_formats.c > b/drivers/gpu/drm/vkms/vkms_formats.c > index 172830a3936a..6e3dc8682ff9 100644 > --- a/drivers/gpu/drm/vkms/vkms_formats.c > +++ b/drivers/gpu/drm/vkms/vkms_formats.c > @@ -216,6 +238,14 @@ static void argb_u16_to_RGB565(u8 *dst_pixels, struct > pixel_argb_u16 *in_pixel) > *pixels = cpu_to_le16(r << 11 | g << 5 | b); > } > > +/** This comment is not in kernel-doc format, so either use "/*" to begin the comment or add the function name in the first comment line, like: + * vkms_writeback_row - Generic loop for all supported writeback format. It is executed just after the blending to > + * Generic loop for all supported writeback format. It is executed just > after the blending to > + * write a line in the writeback buffer. > + * > + * @wb: Job where to insert the final image > + * @src_buffer: Line to write > + * @y: Row to write in the writeback buffer > + */ > void vkms_writeback_row(struct vkms_writeback_job *wb, > const struct line_buffer *src_buffer, int y) > { > @@ -229,6 +259,13 @@ void vkms_writeback_row(struct vkms_writeback_job *wb, > wb->pixel_write(dst_pixels, _pixels[x]); > } > > +/** Needs function name or don't use "/**" to begin the comment. > + * Retrieve the correct read_pixel function for a specific format. > + * The returned pointer is NULL for unsupported pixel formats. The caller > must ensure that the > + * pointer is valid before using it in a vkms_plane_state. > + * > + * @format: DRM_FORMAT_* value for which to obtain a conversion function > (see [drm_fourcc.h]) > + */ > void *get_pixel_conversion_function(u32 format) > { > switch (format) { > @@ -247,6 +284,13 @@ void *get_pixel_conversion_function(u32 format) > } > } > > +/** Same here. > + * Retrieve the correct write_pixel function for a specific format. > + * The returned pointer is NULL for unsupported pixel formats. The caller > must ensure that the > + * pointer is valid before using it in a vkms_writeback_job. > + * > + * @format: DRM_FORMAT_* value for which to obtain a conversion function > (see [drm_fourcc.h]) > + */ > void *get_pixel_write_function(u32 format) > { > switch (format) { > thanks. -- #Randy
Re: [PATCH] Removed vcpi field description to fix kernel doc warning
On 3/7/24 18:51, R SUNDAR wrote: > For linux-next repo > > /include/drm/display/drm_dp_mst_helper.h:156: warning: Excess struct member > 'vcpi' description in 'drm_dp_mst_port' > > Signed-off-by: R SUNDAR or https://lore.kernel.org/lkml/20240106032321.28596-1-rdun...@infradead.org/ but I would be happy to see either of them merged. Thanks. > --- > include/drm/display/drm_dp_mst_helper.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/drm/display/drm_dp_mst_helper.h > b/include/drm/display/drm_dp_mst_helper.h > index 9b19d8bd520a..3ae88a383a41 100644 > --- a/include/drm/display/drm_dp_mst_helper.h > +++ b/include/drm/display/drm_dp_mst_helper.h > @@ -83,7 +83,6 @@ struct drm_dp_mst_branch; > * @passthrough_aux: parent aux to which DSC pass-through requests should be > * sent, only set if DSC pass-through is possible. > * @parent: branch device parent of this port > - * @vcpi: Virtual Channel Payload info for this port. > * @connector: DRM connector this port is connected to. Protected by > * _dp_mst_topology_mgr.base.lock. > * @mgr: topology manager this port lives under. -- #Randy
Re: [PATCH] Removed funcs field description for kernel doc warning.
Hi-- On 3/4/24 18:48, R SUNDAR wrote: > /include/drm/drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' > description in 'drm_vram_mm' > > Signed-off-by: R SUNDAR or https://lore.kernel.org/lkml/20240204145348.56924-1-agarwala.kar...@gmail.com/ or https://lore.kernel.org/lkml/20240106032957.1195-1-rdun...@infradead.org/ but in any case I would like to see any one of these patches merged. Thanks. Reviewed-by: Randy Dunlap > --- > include/drm/drm_gem_vram_helper.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/drm/drm_gem_vram_helper.h > b/include/drm/drm_gem_vram_helper.h > index e18429f09e53..c89c9bafeb44 100644 > --- a/include/drm/drm_gem_vram_helper.h > +++ b/include/drm/drm_gem_vram_helper.h > @@ -170,7 +170,6 @@ void drm_gem_vram_simple_display_pipe_cleanup_fb( > * @vram_base: Base address of the managed video memory > * @vram_size: Size of the managed video memory in bytes > * @bdev:The TTM BO device. > - * @funcs: TTM BO functions > * > * The fields drm_vram_mm.vram_base and > * drm_vram_mm.vrm_size are managed by VRAM MM, but are -- #Randy
Re: [PATCH 1/3] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing
On 3/2/24 14:10, Guenter Roeck wrote: > On Thu, Feb 29, 2024 at 12:21 PM Linus Torvalds > wrote: >> >> On Thu, 29 Feb 2024 at 01:23, Nikolai Kondrashov wrote: >>> >>> However, I think a better approach would be *not* to add the .gitlab-ci.yaml >>> file in the root of the source tree, but instead change the very same repo >>> setting to point to a particular entry YAML, *inside* the repo (somewhere >>> under "ci" directory) instead. >> >> I really don't want some kind of top-level CI for the base kernel project. >> >> We already have the situation that the drm people have their own ci >> model. II'm ok with that, partly because then at least the maintainers >> of that subsystem can agree on the rules for that one subsystem. >> >> I'm not at all interested in having something that people will then >> either fight about, or - more likely - ignore, at the top level >> because there isn't some global agreement about what the rules are. >> >> For example, even just running checkpatch is often a stylistic thing, >> and not everybody agrees about all the checkpatch warnings. >> > > While checkpatch is indeed of arguable value, I think it would help a > lot not having to bother about the persistent _build_ failures on > 32-bit systems. You mentioned the fancy drm CI system above, but they > don't run tests and not even test builds on 32-bit targets, which has > repeatedly caused (and currently does cause) build failures in drm > code when trying to build, say, arm:allmodconfig in linux-next. Most > trivial build failures in linux-next (and, yes, sometimes mainline) > could be prevented with a simple generic CI. Yes, definitely. Thanks for bringing that up. > Sure, argue against checkpatch as much as you like, but the code > should at least _build_, and it should not be necessary for random > people to report build failures to the submitters. I do 110 randconfig builds nightly (10 each of 11 $ARCH/$BITS). That's about all the horsepower that I have. and I am not a CI. :) So I see quite a bit of what you are saying. It seems that Arnd is in the same boat. -- #Randy
Re: linux-next: Tree for Feb 26 (drivers/gpu/drm/xe)
On 2/25/24 22:55, Stephen Rothwell wrote: > Hi all, > > Changes since 20240223: > on powerpc32 or i386: ../drivers/gpu/drm/xe/xe_ggtt.c: In function 'xe_ggtt_set_pte': ../drivers/gpu/drm/xe/xe_ggtt.c:78:9: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration] 78 | writeq(pte, >gsm[addr >> XE_PTE_SHIFT]); | ^~ | writel -- #Randy
Re: [PATCH] drm/tests/drm_buddy: avoid 64-bit calculation
On 2/16/24 12:24, Arnd Bergmann wrote: > From: Arnd Bergmann > > The newly added drm_test_buddy_alloc_contiguous() test fails to link on > 32-bit targets because of inadvertent 64-bit calculations: > > ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/tests/drm_buddy_test.ko] > undefined! > ERROR: modpost: "__aeabi_ldivmod" [drivers/gpu/drm/tests/drm_buddy_test.ko] > undefined! > >>From what I can tell, the numbers cannot possibly overflow a 32-bit size, > so use different types for these. > > I noticed that the function has another possible flaw in that is mixes > what it calls pages with 4KB units. This is a big confusing at best, > or possibly broken when built on machines with larger pages. > > Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") > Signed-off-by: Arnd Bergmann Tested-by: Randy Dunlap Thanks. > --- > drivers/gpu/drm/tests/drm_buddy_test.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c > b/drivers/gpu/drm/tests/drm_buddy_test.c > index fee6bec757d1..50a5f98cd5bd 100644 > --- a/drivers/gpu/drm/tests/drm_buddy_test.c > +++ b/drivers/gpu/drm/tests/drm_buddy_test.c > @@ -21,7 +21,8 @@ static inline u64 get_size(int order, u64 chunk_size) > > static void drm_test_buddy_alloc_contiguous(struct kunit *test) > { > - u64 mm_size, ps = SZ_4K, i, n_pages, total; > + u64 mm_size, total; > + u32 i, ps = SZ_4K, n_pages; > struct drm_buddy_block *block; > struct drm_buddy mm; > LIST_HEAD(left); > @@ -29,7 +30,8 @@ static void drm_test_buddy_alloc_contiguous(struct kunit > *test) > LIST_HEAD(right); > LIST_HEAD(allocated); > > - mm_size = 16 * 3 * SZ_4K; > + n_pages = 16 * 3; > + mm_size = n_pages * SZ_4K; > > KUNIT_EXPECT_FALSE(test, drm_buddy_init(, mm_size, ps)); > > @@ -42,7 +44,6 @@ static void drm_test_buddy_alloc_contiguous(struct kunit > *test) >*/ > > i = 0; > - n_pages = mm_size / ps; > do { > struct list_head *list; > int slot = i % 3; -- #Randy
Re: linux-next: Tree for Feb 15 (drivers/gpu/drm/tests/drm_buddy_test.o)
On 2/14/24 19:52, Stephen Rothwell wrote: > Hi all, > > Changes since 20240214: > on i386: ld: drivers/gpu/drm/tests/drm_buddy_test.o: in function `drm_test_buddy_alloc_contiguous': /work/lnx/next/linux-next-20240215/X32/../drivers/gpu/drm/tests/drm_buddy_test.c:48:(.text+0x94): undefined reference to `__umoddi3' Full randconfig file is attached. -- #Randy config-r7122.gz Description: application/gzip
[PATCH v2] iosys-map: fix typo
Correct a spello/typo in comments. Signed-off-by: Randy Dunlap Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org --- v2: don't change "set up" to "setup" (Thomas) include/linux/iosys-map.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -- a/include/linux/iosys-map.h b/include/linux/iosys-map.h --- a/include/linux/iosys-map.h +++ b/include/linux/iosys-map.h @@ -34,7 +34,7 @@ * the same driver for allocation, read and write operations. * * Open-coding access to :c:type:`struct iosys_map ` is considered - * bad style. Rather then accessing its fields directly, use one of the provided + * bad style. Rather than accessing its fields directly, use one of the provided * helper functions, or implement your own. For example, instances of * :c:type:`struct iosys_map ` can be initialized statically with * IOSYS_MAP_INIT_VADDR(), or at runtime with iosys_map_set_vaddr(). These
[PATCH v3] drm: drm_crtc: correct some comments
Fix some typos and punctuation. Signed-off-by: Randy Dunlap Cc: Alex Deucher Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- v2: s/instances/instance/ (Alex) v3: rebase and resend; add more Cc:s drivers/gpu/drm/drm_crtc.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff -- a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -61,13 +61,13 @@ * to one or more _encoder, which are then each connected to one * _connector. * - * To create a CRTC, a KMS drivers allocates and zeroes an instances of + * To create a CRTC, a KMS driver allocates and zeroes an instance of * drm_crtc (possibly as part of a larger structure) and registers it * with a call to drm_crtc_init_with_planes(). * - * The CRTC is also the entry point for legacy modeset operations, see - * _crtc_funcs.set_config, legacy plane operations, see - * _crtc_funcs.page_flip and _crtc_funcs.cursor_set2, and other legacy + * The CRTC is also the entry point for legacy modeset operations (see + * _crtc_funcs.set_config), legacy plane operations (see + * _crtc_funcs.page_flip and _crtc_funcs.cursor_set2), and other legacy * operations like _crtc_funcs.gamma_set. For atomic drivers all these * features are controlled through _property and * _mode_config_funcs.atomic_check.
Re: [PATCH RESEND] iosys-map: fix typos
On 2/11/24 23:13, Thomas Zimmermann wrote: > Hi > > Am 12.02.24 um 05:28 schrieb Randy Dunlap: >> Correct spellos/typos in comments. >> >> Signed-off-by: Randy Dunlap >> Cc: Thomas Zimmermann >> Cc: dri-devel@lists.freedesktop.org >> --- >> include/linux/iosys-map.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff -- a/include/linux/iosys-map.h b/include/linux/iosys-map.h >> --- a/include/linux/iosys-map.h >> +++ b/include/linux/iosys-map.h >> @@ -34,7 +34,7 @@ >> * the same driver for allocation, read and write operations. >> * >> * Open-coding access to :c:type:`struct iosys_map ` is >> considered >> - * bad style. Rather then accessing its fields directly, use one of the >> provided >> + * bad style. Rather than accessing its fields directly, use one of the >> provided > Ok. >> * helper functions, or implement your own. For example, instances of >> * :c:type:`struct iosys_map ` can be initialized statically >> with >> * IOSYS_MAP_INIT_VADDR(), or at runtime with iosys_map_set_vaddr(). These >> @@ -85,7 +85,7 @@ >> * if (iosys_map_is_equal(_map, _map)) >> * // always false >> * >> - * A set up instance of struct iosys_map can be used to access or >> manipulate the >> + * A setup instance of struct iosys_map can be used to access or manipulate >> the > That's not a typo. This refers to "an instance that has been set up". > Thanks. I'll drop that part and resend the other. > >> * buffer memory. Depending on the location of the memory, the provided >> helpers >> * will pick the correct operations. Data can be copied into the memory >> with >> * iosys_map_memcpy_to(). The address can be manipulated with >> iosys_map_incr(). > -- #Randy
[PATCH RESEND] iosys-map: fix typos
Correct spellos/typos in comments. Signed-off-by: Randy Dunlap Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org --- include/linux/iosys-map.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/include/linux/iosys-map.h b/include/linux/iosys-map.h --- a/include/linux/iosys-map.h +++ b/include/linux/iosys-map.h @@ -34,7 +34,7 @@ * the same driver for allocation, read and write operations. * * Open-coding access to :c:type:`struct iosys_map ` is considered - * bad style. Rather then accessing its fields directly, use one of the provided + * bad style. Rather than accessing its fields directly, use one of the provided * helper functions, or implement your own. For example, instances of * :c:type:`struct iosys_map ` can be initialized statically with * IOSYS_MAP_INIT_VADDR(), or at runtime with iosys_map_set_vaddr(). These @@ -85,7 +85,7 @@ * if (iosys_map_is_equal(_map, _map)) * // always false * - * A set up instance of struct iosys_map can be used to access or manipulate the + * A setup instance of struct iosys_map can be used to access or manipulate the * buffer memory. Depending on the location of the memory, the provided helpers * will pick the correct operations. Data can be copied into the memory with * iosys_map_memcpy_to(). The address can be manipulated with iosys_map_incr().
Re: [PATCH] gpu: drm: display: indent fix in comment
On 2/8/24 07:20, Kousik Sanagavarapu wrote: > On Thu, Jan 25, 2024 at 12:05:56AM +0530, Kousik Sanagavarapu wrote: >> The comments explaining the function "drm_dp_mst_atom_check_mgr()" had >> uneven indentation which made "make htmldocs" complain: >> >> Documentation/gpu/drm-kms-helpers:296: >> ./drivers/gpu/drm/display/drm_dp_mst_topology.c:5496: >> ERROR: Unexpected indentation. >> >> Documentation/gpu/drm-kms-helpers:296: >> ./drivers/gpu/drm/display/drm_dp_mst_topology.c:5500: >> WARNING: Block quote ends without a blank line; unexpected unindent. >> >> Fix this by getting the indent right. >> >> Signed-off-by: Kousik Sanagavarapu >> -- > > Ping again. > > Thanks Hi, This seems to be fixed by commit 1a84c213146a. If you don't agree, please explain. Thanks. -- #Randy
[PATCH] fbdev/sh7760fb: allow modular build
There is no reason to prohibit sh7760fb from being built as a loadable module as suggested by Geert, so change the config symbol from bool to tristate to allow that and change the FB dependency as needed. Fixes: f75f71b2c418 ("fbdev/sh7760fb: Depend on FB=y") Suggested-by: Geert Uytterhoeven Signed-off-by: Randy Dunlap Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: John Paul Adrian Glaubitz Cc: Sam Ravnborg Cc: Helge Deller Cc: linux-fb...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org --- drivers/video/fbdev/Kconfig |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1645,8 +1645,8 @@ config FB_COBALT select FB_IOMEM_HELPERS config FB_SH7760 - bool "SH7760/SH7763/SH7720/SH7721 LCDC support" - depends on FB=y && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \ + tristate "SH7760/SH7763/SH7720/SH7721 LCDC support" + depends on FB && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \ || CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721) select FB_IOMEM_HELPERS help
[PATCH v2] drivers/ps3: select VIDEO to provide cmdline functions
When VIDEO is not set, there is a build error. Fix that by selecting VIDEO for PS3_PS3AV. ERROR: modpost: ".video_get_options" [drivers/ps3/ps3av_mod.ko] undefined! Fixes: dae7fbf43fd0 ("driver/ps3: Include for mode parsing") Fixes: a3b6792e990d ("video/cmdline: Introduce CONFIG_VIDEO for video= parameter") Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Aneesh Kumar K.V Cc: Naveen N. Rao Cc: linuxppc-...@lists.ozlabs.org Cc: Thomas Zimmermann Cc: Geoff Levand Acked-by: Geoff Levand Cc: linux-fb...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Randy Dunlap --- v2: add Geoff's Ack; add second Fixes: tag and more Cc:s (Thomas) arch/powerpc/platforms/ps3/Kconfig |1 + 1 file changed, 1 insertion(+) diff -- a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig @@ -67,6 +67,7 @@ config PS3_VUART config PS3_PS3AV depends on PPC_PS3 tristate "PS3 AV settings driver" if PS3_ADVANCED + select VIDEO select PS3_VUART default y help
Re: linux-next: Tree for Feb 6 (gpu/drm/amd/display/ kernel-doc warnings)
On 2/5/24 20:43, Stephen Rothwell wrote: > Hi all, > > Changes since 20240205: > Hi Rodrigo, Are you aware of these kernel-doc warnings? I think they are due to commit b8c1c3a82e75 Author: Rodrigo Siqueira Date: Mon Jan 22 14:24:57 2024 -0700 Documentation/gpu: Add kernel doc entry for MPC ../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/opp.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/opp.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no structured comments found ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:132: warning: Incorrect use of kernel-doc format: * @@overlap_only: Whether overlapping of different planes is allowed. ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:132: warning: Incorrect use of kernel-doc format: * @@overlap_only: Whether overlapping of different planes is allowed. ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:132: warning: Incorrect use of kernel-doc format: * @@overlap_only: Whether overlapping of different planes is allowed. ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:162: warning: Function parameter or struct member 'pre_multiplied_alpha' not described in 'mpcc_blnd_cfg' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:162: warning: Function parameter or struct member 'overlap_only' not described in 'mpcc_blnd_cfg' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'read_mpcc_state' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'mpc_init_single_inst' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'get_mpcc_for_dpp_from_secondary' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'get_mpcc_for_dpp' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'wait_for_idle' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'assert_mpcc_idle_before_connect' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'init_mpcc_list_from_hw' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'set_denorm' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'set_denorm_clamp' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'set_output_csc' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'set_ocsc_default' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'set_output_gamma' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'power_on_mpc_mem_pwr' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'set_dwb_mux' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'disable_dwb_mux' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'is_dwb_idle' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'set_out_rate_control' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'set_gamut_remap' not described in 'mpc_funcs' ../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter or struct member 'program_1dlut' not described in 'mpc_funcs'
[PATCH v2] drm/panel: re-alphabetize the menu list
A few of the DRM_PANEL entries have become out of alphabetical order, so move them around a bit to restore alpha order. Signed-off-by: Randy Dunlap Cc: Neil Armstrong Cc: Jessica Zhang Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Aradhya Bhatia --- v2: rebase, move more driver entries around Aradhya Bhatia had responded with Reviewed-by: for v1, but I mode quite a few additions in v2 so I didn't include that R-B: here. drivers/gpu/drm/panel/Kconfig | 202 1 file changed, 101 insertions(+), 101 deletions(-) diff -- a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -76,53 +76,6 @@ config DRM_PANEL_BOE_TV101WUM_NL6 Say Y here if you want to support for BOE TV101WUM and AUO KD101N80 45NA WUXGA PANEL DSI Video Mode panel -config DRM_PANEL_DSI_CM - tristate "Generic DSI command mode panels" - depends on OF - depends on DRM_MIPI_DSI - depends on BACKLIGHT_CLASS_DEVICE - help - DRM panel driver for DSI command mode panels with support for - embedded and external backlights. - -config DRM_PANEL_LVDS - tristate "Generic LVDS panel driver" - depends on OF - depends on BACKLIGHT_CLASS_DEVICE - select VIDEOMODE_HELPERS - help - This driver supports LVDS panels that don't require device-specific - handling of power supplies or control signals. It implements automatic - backlight handling if the panel is attached to a backlight controller. - -config DRM_PANEL_SIMPLE - tristate "support for simple panels (other than eDP ones)" - depends on OF - depends on BACKLIGHT_CLASS_DEVICE - depends on PM - select VIDEOMODE_HELPERS - help - DRM panel driver for dumb non-eDP panels that need at most a regulator - and a GPIO to be powered up. Optionally a backlight can be attached so - that it can be automatically turned off when the panel goes into a - low power state. - -config DRM_PANEL_EDP - tristate "support for simple Embedded DisplayPort panels" - depends on OF - depends on BACKLIGHT_CLASS_DEVICE - depends on PM - select VIDEOMODE_HELPERS - select DRM_DISPLAY_DP_HELPER - select DRM_DISPLAY_HELPER - select DRM_DP_AUX_BUS - select DRM_KMS_HELPER - help - DRM panel driver for dumb eDP panels that need at most a regulator and - a GPIO to be powered up. Optionally a backlight can be attached so - that it can be automatically turned off when the panel goes into a - low power state. - config DRM_PANEL_EBBG_FT8719 tristate "EBBG FT8719 panel driver" depends on OF @@ -162,6 +115,25 @@ config DRM_PANEL_FEIYANG_FY07024DI26A30D Say Y if you want to enable support for panels based on the Feiyang FY07024DI26A30-D MIPI-DSI interface. +config DRM_PANEL_DSI_CM + tristate "Generic DSI command mode panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + DRM panel driver for DSI command mode panels with support for + embedded and external backlights. + +config DRM_PANEL_LVDS + tristate "Generic LVDS panel driver" + depends on OF + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + help + This driver supports LVDS panels that don't require device-specific + handling of power supplies or control signals. It implements automatic + backlight handling if the panel is attached to a backlight controller. + config DRM_PANEL_HIMAX_HX8394 tristate "HIMAX HX8394 MIPI-DSI LCD panels" depends on OF @@ -251,17 +223,6 @@ config DRM_PANEL_JADARD_JD9365DA_H3 WXGA MIPI DSI panel. The panel support TFT dot matrix LCD with 800RGBx1280 dots at maximum. -config DRM_PANEL_JDI_LT070ME05000 - tristate "JDI LT070ME05000 WUXGA DSI panel" - depends on OF - depends on DRM_MIPI_DSI - depends on BACKLIGHT_CLASS_DEVICE - help - Say Y here if you want to enable support for JDI DSI video mode - panel as found in Google Nexus 7 (2013) devices. - The panel has a 1200(RGB)×1920 (WUXGA) resolution and uses - 24 bit per pixel. - config DRM_PANEL_JDI_LPM102A188A tristate "JDI LPM102A188A DSI panel" depends on OF && GPIOLIB @@ -273,6 +234,17 @@ config DRM_PANEL_JDI_LPM102A188A The panel has a 2560×1800 resolution. It provides a MIPI DSI interface to the host. +config DRM_PANEL_JDI_LT070ME05000 + tristate "JDI LT070ME05000
[PATCH v2] drm/rect: fix kernel-doc typos
Correct typos of "translated". Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Reviewed-by: Simon Ser Signed-off-by: Randy Dunlap --- v2: add Reviewed-by, rebase include/drm/drm_rect.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/include/drm/drm_rect.h b/include/drm/drm_rect.h --- a/include/drm/drm_rect.h +++ b/include/drm/drm_rect.h @@ -129,7 +129,7 @@ static inline void drm_rect_adjust_size( /** * drm_rect_translate - translate the rectangle - * @r: rectangle to be tranlated + * @r: rectangle to be translated * @dx: horizontal translation * @dy: vertical translation * @@ -146,7 +146,7 @@ static inline void drm_rect_translate(st /** * drm_rect_translate_to - translate the rectangle to an absolute position - * @r: rectangle to be tranlated + * @r: rectangle to be translated * @x: horizontal position * @y: vertical position *
Re: linux-next: Tree for Jan 29 (drm/xe/ and FB_IOMEM_HELPERS)
On 1/28/24 19:30, Stephen Rothwell wrote: > Hi all, > > Changes since 20240125: > > New trees: i2c-host-fixes, i2c-host > on riscv 64-bit or powerpc 64-bit: WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n] Selected by [m]: - DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM_XE [=m] && DRM_XE [=m]=m riscv 64-bit randconfig file is attached. -- #Randy config-r5943.gz Description: application/gzip
Re: linux-next: Tree for Jan 23 (drm/xe/)
On 1/24/24 01:17, Jani Nikula wrote: > On Tue, 23 Jan 2024, Randy Dunlap wrote: >> On 1/22/24 18:29, Stephen Rothwell wrote: >>> Hi all, >>> >>> News: there will be no linux-next release on Friday >>> >>> Changes since 20240122: >>> >> >> on ARM64, when >> DRM_I915 is not set >> DRM_XE=m >> DEBUG_FS is not set >> >> ../drivers/gpu/drm/i915/display/intel_display_debugfs.c:1091:6: error: >> redefinition of 'intel_display_debugfs_register' >> 1091 | void intel_display_debugfs_register(struct drm_i915_private *i915) >> | ^~ >> In file included from >> ../drivers/gpu/drm/i915/display/intel_display_debugfs.c:19: > > Does [1] fix the issue? Yes, thanks. > > BR, > Jani. > > > [1] https://lore.kernel.org/r/20240124090515.3363901-1-jani.nik...@intel.com > > -- #Randy
Re: linux-next: Tree for Jan 23 (drm/xe/)
On 1/22/24 18:29, Stephen Rothwell wrote: > Hi all, > > News: there will be no linux-next release on Friday > > Changes since 20240122: > on ARM64, when DRM_I915 is not set DRM_XE=m DEBUG_FS is not set ../drivers/gpu/drm/i915/display/intel_display_debugfs.c:1091:6: error: redefinition of 'intel_display_debugfs_register' 1091 | void intel_display_debugfs_register(struct drm_i915_private *i915) | ^~ In file included from ../drivers/gpu/drm/i915/display/intel_display_debugfs.c:19: ../drivers/gpu/drm/i915/display/intel_display_debugfs.h:18:20: note: previous definition of 'intel_display_debugfs_register' with type 'void(struct xe_device *)' 18 | static inline void intel_display_debugfs_register(struct drm_i915_private *i915) {} |^~ ../drivers/gpu/drm/i915/display/intel_display_debugfs.c:1571:6: error: redefinition of 'intel_connector_debugfs_add' 1571 | void intel_connector_debugfs_add(struct intel_connector *connector) | ^~~ ../drivers/gpu/drm/i915/display/intel_display_debugfs.h:19:20: note: previous definition of 'intel_connector_debugfs_add' with type 'void(struct intel_connector *)' 19 | static inline void intel_connector_debugfs_add(struct intel_connector *connector) {} |^~~ ../drivers/gpu/drm/i915/display/intel_display_debugfs.c:1626:6: error: redefinition of 'intel_crtc_debugfs_add' 1626 | void intel_crtc_debugfs_add(struct intel_crtc *crtc) | ^~ ../drivers/gpu/drm/i915/display/intel_display_debugfs.h:20:20: note: previous definition of 'intel_crtc_debugfs_add' with type 'void(struct intel_crtc *)' 20 | static inline void intel_crtc_debugfs_add(struct intel_crtc *crtc) {} |^~ ../drivers/gpu/drm/i915/display/intel_pipe_crc.c:437:6: error: redefinition of 'intel_crtc_crc_init' 437 | void intel_crtc_crc_init(struct intel_crtc *crtc) | ^~~ In file included from ../drivers/gpu/drm/i915/display/intel_pipe_crc.c:36: ../drivers/gpu/drm/i915/display/intel_pipe_crc.h:25:20: note: previous definition of 'intel_crtc_crc_init' with type 'void(struct intel_crtc *)' 25 | static inline void intel_crtc_crc_init(struct intel_crtc *crtc) {} |^~~ ../drivers/gpu/drm/i915/display/intel_pipe_crc.c: In function 'intel_crtc_crc_init': ../drivers/gpu/drm/i915/display/intel_pipe_crc.c:439:48: error: 'struct intel_crtc' has no member named 'pipe_crc' 439 | struct intel_pipe_crc *pipe_crc = >pipe_crc; |^~ In file included from ../include/uapi/linux/posix_types.h:5, from ../include/uapi/linux/types.h:14, from ../include/linux/types.h:6, from ../include/linux/kasan-checks.h:5, from ../include/asm-generic/rwonce.h:26, from ../arch/arm64/include/asm/rwonce.h:71, from ../include/linux/compiler.h:251, from ../include/linux/ctype.h:5, from ../drivers/gpu/drm/i915/display/intel_pipe_crc.c:27: ../drivers/gpu/drm/i915/display/intel_pipe_crc.c: At top level: ../include/linux/stddef.h:8:16: error: expected identifier or '(' before 'void' 8 | #define NULL ((void *)0) |^~~~ ../drivers/gpu/drm/i915/display/intel_pipe_crc.h:28:36: note: in expansion of macro 'NULL' 28 | #define intel_crtc_get_crc_sources NULL |^~~~ ../drivers/gpu/drm/i915/display/intel_pipe_crc.c:549:20: note: in expansion of macro 'intel_crtc_get_crc_sources' 549 | const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc, |^~ ../include/linux/stddef.h:8:23: error: expected ')' before numeric constant 8 | #define NULL ((void *)0) | ^ ../drivers/gpu/drm/i915/display/intel_pipe_crc.h:28:36: note: in expansion of macro 'NULL' 28 | #define intel_crtc_get_crc_sources NULL |^~~~ ../drivers/gpu/drm/i915/display/intel_pipe_crc.c:549:20: note: in expansion of macro 'intel_crtc_get_crc_sources' 549 | const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc, |^~ ../include/linux/stddef.h:8:16: error: expected identifier or '(' before 'void' 8 | #define NULL ((void *)0) |^~~~ ../drivers/gpu/drm/i915/display/intel_pipe_crc.h:27:38: note: in expansion of macro 'NULL' 27 | #define intel_crtc_verify_crc_source NULL | ^~~~ ../drivers/gpu/drm/i915/display/intel_pipe_crc.c:556:5: note: in expansion of macro 'intel_crtc_verify_crc_source' 556 | int intel_crtc_verify_crc_source(struct drm_crtc *crtc,
Re: [PATCH 2/2] scripts/kernel-doc: Do not process backslash lines in comments
On 1/22/24 01:31, Anna-Maria Behnsen wrote: > Commit 654784284430 ("kernel-doc: bugfix - multi-line macros") introduces > pre-processing of backslashes at the end of a line to not break multi-line > macros. This pre-processing is done independently if it is inside code or > inside a comment. > > This illustation of a hierarchy as a code block inside a kernel-doc comment > has a backslash at the end of the line: > > ---8<--- > /** > * DOC: hierarchy > * > *Top Level > */ \ > * Child A Child B > */ > ---8<--- > > It will be displayed as: > > ---8<--- >Top Level >/*Child A Child B > ---8<--- > > To prevent this, do the pre-processing only for lines which are no > comments, e.g. do not start with ' *'. > > Suggested-by: Matthew Wilcox > Signed-off-by: Anna-Maria Behnsen I compared several hundred html files before and after this patch and they were all the same, so I will say: Tested-by: Randy Dunlap Thanks. > --- > scripts/kernel-doc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/kernel-doc b/scripts/kernel-doc > index e8aefd258a29..4277af79de86 100755 > --- a/scripts/kernel-doc > +++ b/scripts/kernel-doc > @@ -2331,7 +2331,7 @@ sub process_file($) { > > $section_counter = 0; > while () { > - while (s/\\\s*$//) { > + while (!/^ \*/ && s/\\\s*$//) { > $_ .= ; > } > # Replace tabs by spaces -- #Randy
Re: [PATCH] drm/display: fix typo
On 1/19/24 02:22, Oleksandr Natalenko wrote: > While studying the code I've bumped into a small typo within the > kernel-doc for two functions, apparently, due to copy-paste. > > This commit fixes "sizo" word to be "size". > > Signed-off-by: Oleksandr Natalenko Acked-by: Randy Dunlap Thanks. > --- > drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c > b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c > index bd61e20770a5b..14a2a8473682b 100644 > --- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c > +++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c > @@ -52,7 +52,7 @@ > * @adapter: I2C adapter for the DDC bus > * @offset: register offset > * @buffer: buffer for return data > - * @size: sizo of the buffer > + * @size: size of the buffer > * > * Reads @size bytes from the DP dual mode adaptor registers > * starting at @offset. > @@ -116,7 +116,7 @@ EXPORT_SYMBOL(drm_dp_dual_mode_read); > * @adapter: I2C adapter for the DDC bus > * @offset: register offset > * @buffer: buffer for write data > - * @size: sizo of the buffer > + * @size: size of the buffer > * > * Writes @size bytes to the DP dual mode adaptor registers > * starting at @offset. -- #Randy
Re: [PATCH] drm/imagination: fix ARRAY_SIZE build error
Hi Matt, On 1/18/24 01:38, Matt Coster wrote: > On 10/01/2024 00:23, Randy Dunlap wrote: >> Fix a build error when using GCC 13.2.0 from kernel.org crosstools >> by changing ARRAY_SIZE() to the macro PVR_MIPS_PT_PAGE_COUNT: > > I assume you're referring to the x86_64 => aarch64 toolchain here? Yes. > >> drivers/gpu/drm/imagination/pvr_vm_mips.c: In function 'pvr_vm_mips_fini': >> ../include/linux/array_size.h:11:25: warning: overflow in conversion from >> 'long unsigned int' to 'int' changes value from '18446744073709551615' to >> '-1' [-Woverflow] >> 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + >> __must_be_array(arr)) >> | ^ >> drivers/gpu/drm/imagination/pvr_vm_mips.c:105:24: note: in expansion of >> macro 'ARRAY_SIZE' >> 105 | for (page_nr = ARRAY_SIZE(mips_data->pt_pages) - 1; page_nr >> >= 0; page_nr--) { >> | ^~ > > I can't seem to reproduce this using the above toolchain (or any other), > even with -Woverflow explicitly specified. > > The use of ARRAY_SIZE() in loop bounds is a pretty common construction – > even within the pvr driver. Do you see similar warnings anywhere else? No, this is the only place that I have seen this issue. Thanks. > -- > Matt Coster > Imagination Technologies > >> Fixes: 927f3e0253c1 ("drm/imagination: Implement MIPS firmware processor and >> MMU support") >> Signed-off-by: Randy Dunlap >> Cc: Donald Robson >> Cc: Maxime Ripard >> Cc: Frank Binns >> Cc: Matt Coster >> Cc: Maarten Lankhorst >> Cc: Thomas Zimmermann >> Cc: David Airlie >> Cc: Daniel Vetter >> Cc: dri-devel@lists.freedesktop.org >> --- >> drivers/gpu/drm/imagination/pvr_vm_mips.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff -- a/drivers/gpu/drm/imagination/pvr_vm_mips.c >> b/drivers/gpu/drm/imagination/pvr_vm_mips.c >> --- a/drivers/gpu/drm/imagination/pvr_vm_mips.c >> +++ b/drivers/gpu/drm/imagination/pvr_vm_mips.c >> @@ -46,7 +46,7 @@ pvr_vm_mips_init(struct pvr_device *pvr_ >> if (!mips_data) >> return -ENOMEM; >> - for (page_nr = 0; page_nr < ARRAY_SIZE(mips_data->pt_pages); >> page_nr++) { >> + for (page_nr = 0; page_nr < PVR_MIPS_PT_PAGE_COUNT; page_nr++) { >> mips_data->pt_pages[page_nr] = alloc_page(GFP_KERNEL | __GFP_ZERO); >> if (!mips_data->pt_pages[page_nr]) { >> err = -ENOMEM; >> @@ -102,7 +102,7 @@ pvr_vm_mips_fini(struct pvr_device *pvr_ >> int page_nr; >> vunmap(mips_data->pt); >> - for (page_nr = ARRAY_SIZE(mips_data->pt_pages) - 1; page_nr >= 0; >> page_nr--) { >> + for (page_nr = PVR_MIPS_PT_PAGE_COUNT - 1; page_nr >= 0; page_nr--) { >> dma_unmap_page(from_pvr_device(pvr_dev)->dev, >> mips_data->pt_dma_addr[page_nr], PAGE_SIZE, >> DMA_TO_DEVICE); >> -- #Randy
[PATCH] drm/amd/display: remove kernel-doc misuses in dmub_replay.c
Change non-kernel-doc comments from "/**" to common "/*" to prevent kernel-doc warnings: dmub_replay.c:262: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Set REPLAY power optimization flags and coasting vtotal. dmub_replay.c:284: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * send Replay general cmd to DMUB. Signed-off-by: Randy Dunlap Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: amd-...@lists.freedesktop.org Cc: Alex Deucher Cc: Christian König Cc: "Pan, Xinhui" Cc: Tom Chung Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c @@ -258,7 +258,7 @@ static void dmub_replay_residency(struct *residency = 0; } -/** +/* * Set REPLAY power optimization flags and coasting vtotal. */ static void dmub_replay_set_power_opt_and_coasting_vtotal(struct dmub_replay *dmub, @@ -280,7 +280,7 @@ static void dmub_replay_set_power_opt_an dc_wake_and_execute_dmub_cmd(dc, , DM_DMUB_WAIT_TYPE_WAIT); } -/** +/* * send Replay general cmd to DMUB. */ static void dmub_replay_send_cmd(struct dmub_replay *dmub,
[PATCH] drm/doc: internals: remove section on PCI legacy support
The functions that were described in this section of drm-internals.rst were removed in NOV-2023, along with all of the kernel-doc comments in the source file. This now causes a docs build warning, so remove that section of the documentation also. drivers/gpu/drm/drm_pci.c:1: warning: no structured comments found Fixes: 2504c7ec728b ("drm: Remove source code for non-KMS drivers") Signed-off-by: Randy Dunlap Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org --- Documentation/gpu/drm-internals.rst | 12 1 file changed, 12 deletions(-) diff -- a/Documentation/gpu/drm-internals.rst b/Documentation/gpu/drm-internals.rst --- a/Documentation/gpu/drm-internals.rst +++ b/Documentation/gpu/drm-internals.rst @@ -153,18 +153,6 @@ Managed Resources .. kernel-doc:: include/drm/drm_managed.h :internal: -Bus-specific Device Registration and PCI Support - - -A number of functions are provided to help with device registration. The -functions deal with PCI and platform devices respectively and are only -provided for historical reasons. These are all deprecated and shouldn't -be used in new drivers. Besides that there's a few helpers for pci -drivers. - -.. kernel-doc:: drivers/gpu/drm/drm_pci.c - :export: - Open/Close, File Operations and IOCTLs ==
[PATCH] dma-buf/dma-resv: fix spelling
Fix spelling mistakes as reported by codespell. Signed-off-by: Randy Dunlap Cc: Sumit Semwal Cc: linux-me...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Christian König Cc: linaro-mm-...@lists.linaro.org --- drivers/dma-buf/dma-resv.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c --- a/drivers/dma-buf/dma-resv.c +++ b/drivers/dma-buf/dma-resv.c @@ -405,7 +405,7 @@ static void dma_resv_iter_walk_unlocked( * * Beware that the iterator can be restarted. Code which accumulates statistics * or similar needs to check for this with dma_resv_iter_is_restarted(). For - * this reason prefer the locked dma_resv_iter_first() whenver possible. + * this reason prefer the locked dma_resv_iter_first() whenever possible. * * Returns the first fence from an unlocked dma_resv obj. */ @@ -428,7 +428,7 @@ EXPORT_SYMBOL(dma_resv_iter_first_unlock * * Beware that the iterator can be restarted. Code which accumulates statistics * or similar needs to check for this with dma_resv_iter_is_restarted(). For - * this reason prefer the locked dma_resv_iter_next() whenver possible. + * this reason prefer the locked dma_resv_iter_next() whenever possible. * * Returns the next fence from an unlocked dma_resv obj. */
[PATCH] dma-buf/dma-fence: fix spelling
Fix spelling mistakes as reported by codespell. Signed-off-by: Randy Dunlap Cc: Sumit Semwal Cc: Gustavo Padovan Cc: linux-me...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Christian König Cc: linaro-mm-...@lists.linaro.org --- drivers/dma-buf/dma-fence.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff -- a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -102,7 +102,7 @@ static atomic64_t dma_fence_context_coun * * * Drivers are allowed to call dma_fence_wait() from their _notifier * respectively _interval_notifier callbacks. This means any code required - * for fence completeion cannot allocate memory with GFP_NOFS or GFP_NOIO. + * for fence completion cannot allocate memory with GFP_NOFS or GFP_NOIO. * Only GFP_ATOMIC is permissible, which might fail. * * Note that only GPU drivers have a reasonable excuse for both requiring @@ -522,7 +522,7 @@ dma_fence_wait_timeout(struct dma_fence EXPORT_SYMBOL(dma_fence_wait_timeout); /** - * dma_fence_release - default relese function for fences + * dma_fence_release - default release function for fences * @kref: _fence.recfount * * This is the default release functions for _fence. Drivers shouldn't call @@ -974,8 +974,8 @@ void dma_fence_set_deadline(struct dma_f EXPORT_SYMBOL(dma_fence_set_deadline); /** - * dma_fence_describe - Dump fence describtion into seq_file - * @fence: the 6fence to describe + * dma_fence_describe - Dump fence description into seq_file + * @fence: the fence to describe * @seq: the seq_file to put the textual description into * * Dump a textual description of the fence and it's state into the seq_file.
[PATCH] drm/imagination: fix ARRAY_SIZE build error
Fix a build error when using GCC 13.2.0 from kernel.org crosstools by changing ARRAY_SIZE() to the macro PVR_MIPS_PT_PAGE_COUNT: drivers/gpu/drm/imagination/pvr_vm_mips.c: In function 'pvr_vm_mips_fini': ../include/linux/array_size.h:11:25: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551615' to '-1' [-Woverflow] 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^ drivers/gpu/drm/imagination/pvr_vm_mips.c:105:24: note: in expansion of macro 'ARRAY_SIZE' 105 | for (page_nr = ARRAY_SIZE(mips_data->pt_pages) - 1; page_nr >= 0; page_nr--) { |^~ Fixes: 927f3e0253c1 ("drm/imagination: Implement MIPS firmware processor and MMU support") Signed-off-by: Randy Dunlap Cc: Donald Robson Cc: Maxime Ripard Cc: Frank Binns Cc: Matt Coster Cc: Maarten Lankhorst Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/imagination/pvr_vm_mips.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/imagination/pvr_vm_mips.c b/drivers/gpu/drm/imagination/pvr_vm_mips.c --- a/drivers/gpu/drm/imagination/pvr_vm_mips.c +++ b/drivers/gpu/drm/imagination/pvr_vm_mips.c @@ -46,7 +46,7 @@ pvr_vm_mips_init(struct pvr_device *pvr_ if (!mips_data) return -ENOMEM; - for (page_nr = 0; page_nr < ARRAY_SIZE(mips_data->pt_pages); page_nr++) { + for (page_nr = 0; page_nr < PVR_MIPS_PT_PAGE_COUNT; page_nr++) { mips_data->pt_pages[page_nr] = alloc_page(GFP_KERNEL | __GFP_ZERO); if (!mips_data->pt_pages[page_nr]) { err = -ENOMEM; @@ -102,7 +102,7 @@ pvr_vm_mips_fini(struct pvr_device *pvr_ int page_nr; vunmap(mips_data->pt); - for (page_nr = ARRAY_SIZE(mips_data->pt_pages) - 1; page_nr >= 0; page_nr--) { + for (page_nr = PVR_MIPS_PT_PAGE_COUNT - 1; page_nr >= 0; page_nr--) { dma_unmap_page(from_pvr_device(pvr_dev)->dev, mips_data->pt_dma_addr[page_nr], PAGE_SIZE, DMA_TO_DEVICE);
Re: [PATCH v2] drm/vram-helper: fix kernel-doc warnings
On 1/9/24 07:25, Daniel Vetter wrote: > On Tue, 9 Jan 2024 at 16:23, Randy Dunlap wrote: >> >> >> >> On 1/9/24 05:42, Daniel Vetter wrote: >>> On Tue, 9 Jan 2024 at 13:59, Daniel Vetter wrote: >>>> >>>> On Mon, Jan 08, 2024 at 01:10:12PM -0800, Randy Dunlap wrote: >>>>> Hi Thomas, >>>>> >>>>> On 1/8/24 00:57, Thomas Zimmermann wrote: >>>>>> Hi, >>>>>> >>>>>> thanks for the fix. >>>>>> >>>>>> Am 06.01.24 um 04:29 schrieb Randy Dunlap: >>>>>>> Remove the @funcs entry from struct drm_vram_mm to quieten the >>>>>>> kernel-doc >>>>>>> warning. >>>>>>> >>>>>>> Use the "define" kernel-doc keyword and an '\' line continuation >>>>>>> to fix another kernel-doc warning. >>>>>>> >>>>>>> drm_gem_vram_helper.h:129: warning: missing initial short description >>>>>>> on line: >>>>>>> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >>>>>>> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' >>>>>>> description in 'drm_vram_mm' >>>>>>> >>>>>>> Signed-off-by: Randy Dunlap >>>>>>> Cc: David Airlie >>>>>>> Cc: Daniel Vetter >>>>>>> Cc: dri-devel@lists.freedesktop.org >>>>>>> Cc: Maarten Lankhorst >>>>>>> Cc: Maxime Ripard >>>>>>> Cc: Thomas Zimmermann >>>>>>> --- >>>>>>> v2: Add commit description >>>>>>> >>>>>>> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a >>>>>>> >>>>>>> include/drm/drm_gem_vram_helper.h |3 +-- >>>>>>> 1 file changed, 1 insertion(+), 2 deletions(-) >>>>>>> >>>>>>> diff -- a/include/drm/drm_gem_vram_helper.h >>>>>>> b/include/drm/drm_gem_vram_helper.h >>>>>>> --- a/include/drm/drm_gem_vram_helper.h >>>>>>> +++ b/include/drm/drm_gem_vram_helper.h >>>>>>> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str >>>>>>>struct drm_plane_state *old_state); >>>>>>> /** >>>>>>> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >>>>>>> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ >>>>>> >>>>>> Did something change wrt. doc syntax? I think this used to work without >>>>>> warnings. About this 'define': we don't use is in another docs. Can we >>>>>> leave it out here or is this the new syntax? >>>>>> >>>>> >>>>> There are no doc syntax changes that I know of. This is not >>>>> new syntax. It has been around since 2014: >>>>> cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") >>>> >>>> I had no idea this exists, thanks a lot for this TIL :-) >>>> >>>> I guess the issue here is that this exists, yay, but it's not documented >>>> with the other here: >>>> >>>> https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation >>>> >>>> I guess a patch to kernel-doc.rst would be great. Adding some kernel-doc >>>> folks. >>> >>> Ok I went ahead and typed that patch (just we don't waste effort), >>> just waiting for the sphinx build to finish to make sure it looks nice >>> before I send out the patch. >>> -Sima >> >> I sent one a few days ago: >> >> https://lore.kernel.org/lkml/20240107012400.32587-1-rdun...@infradead.org/ > > Could you please also add documentation for function-like macros, > since that's also missing? With that acked-by: me. > > Cheers! This is already present: Function documentation -- The general format of a function and function-like macro kernel-doc comment is:: /** * function_name() - Brief description of function. * @arg1: Describe the first argument. * @arg2: Describe the second argument. *One can provide multiple line descriptions *for arguments. but the way that you did it makes sense also. -- #Randy
Re: [PATCH v2] drm/vram-helper: fix kernel-doc warnings
On 1/9/24 05:42, Daniel Vetter wrote: > On Tue, 9 Jan 2024 at 13:59, Daniel Vetter wrote: >> >> On Mon, Jan 08, 2024 at 01:10:12PM -0800, Randy Dunlap wrote: >>> Hi Thomas, >>> >>> On 1/8/24 00:57, Thomas Zimmermann wrote: >>>> Hi, >>>> >>>> thanks for the fix. >>>> >>>> Am 06.01.24 um 04:29 schrieb Randy Dunlap: >>>>> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc >>>>> warning. >>>>> >>>>> Use the "define" kernel-doc keyword and an '\' line continuation >>>>> to fix another kernel-doc warning. >>>>> >>>>> drm_gem_vram_helper.h:129: warning: missing initial short description on >>>>> line: >>>>> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >>>>> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' >>>>> description in 'drm_vram_mm' >>>>> >>>>> Signed-off-by: Randy Dunlap >>>>> Cc: David Airlie >>>>> Cc: Daniel Vetter >>>>> Cc: dri-devel@lists.freedesktop.org >>>>> Cc: Maarten Lankhorst >>>>> Cc: Maxime Ripard >>>>> Cc: Thomas Zimmermann >>>>> --- >>>>> v2: Add commit description >>>>> >>>>> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a >>>>> >>>>> include/drm/drm_gem_vram_helper.h |3 +-- >>>>> 1 file changed, 1 insertion(+), 2 deletions(-) >>>>> >>>>> diff -- a/include/drm/drm_gem_vram_helper.h >>>>> b/include/drm/drm_gem_vram_helper.h >>>>> --- a/include/drm/drm_gem_vram_helper.h >>>>> +++ b/include/drm/drm_gem_vram_helper.h >>>>> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str >>>>>struct drm_plane_state *old_state); >>>>> /** >>>>> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >>>>> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ >>>> >>>> Did something change wrt. doc syntax? I think this used to work without >>>> warnings. About this 'define': we don't use is in another docs. Can we >>>> leave it out here or is this the new syntax? >>>> >>> >>> There are no doc syntax changes that I know of. This is not >>> new syntax. It has been around since 2014: >>> cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") >> >> I had no idea this exists, thanks a lot for this TIL :-) >> >> I guess the issue here is that this exists, yay, but it's not documented >> with the other here: >> >> https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation >> >> I guess a patch to kernel-doc.rst would be great. Adding some kernel-doc >> folks. > > Ok I went ahead and typed that patch (just we don't waste effort), > just waiting for the sphinx build to finish to make sure it looks nice > before I send out the patch. > -Sima I sent one a few days ago: https://lore.kernel.org/lkml/20240107012400.32587-1-rdun...@infradead.org/ -- #Randy
Re: [PATCH v2] drm/vram-helper: fix kernel-doc warnings
Hi Thomas, On 1/8/24 00:57, Thomas Zimmermann wrote: > Hi, > > thanks for the fix. > > Am 06.01.24 um 04:29 schrieb Randy Dunlap: >> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc >> warning. >> >> Use the "define" kernel-doc keyword and an '\' line continuation >> to fix another kernel-doc warning. >> >> drm_gem_vram_helper.h:129: warning: missing initial short description on >> line: >> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description >> in 'drm_vram_mm' >> >> Signed-off-by: Randy Dunlap >> Cc: David Airlie >> Cc: Daniel Vetter >> Cc: dri-devel@lists.freedesktop.org >> Cc: Maarten Lankhorst >> Cc: Maxime Ripard >> Cc: Thomas Zimmermann >> --- >> v2: Add commit description >> >> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a >> >> include/drm/drm_gem_vram_helper.h | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff -- a/include/drm/drm_gem_vram_helper.h >> b/include/drm/drm_gem_vram_helper.h >> --- a/include/drm/drm_gem_vram_helper.h >> +++ b/include/drm/drm_gem_vram_helper.h >> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str >> struct drm_plane_state *old_state); >> /** >> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ > > Did something change wrt. doc syntax? I think this used to work without > warnings. About this 'define': we don't use is in another docs. Can we leave > it out here or is this the new syntax? > There are no doc syntax changes that I know of. This is not new syntax. It has been around since 2014: cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") "define OBJ_LIKE_MACRO" is used 2 other times in include/drm/: drm_fb_helper.h: /** * define DRM_FB_HELPER_DEFAULT_OPS - helper define for drm drivers * * Helper define to register default implementations of drm_fb_helper * functions. To be used in struct fb_ops of drm drivers. */ drm_gem_vram_helper.h: (the file being patched here) /** * define DRM_GEM_VRAM_DRIVER - default callback functions for \ drm_driver * * Drivers that use VRAM MM and GEM VRAM can use this macro to initialize * drm_driver with default functions. */ > >> * Initializes struct drm_plane_helper_funcs for VRAM handling >> * >> * Drivers may use GEM BOs as VRAM helpers for the framebuffer memory. This >> @@ -170,7 +170,6 @@ void drm_gem_vram_simple_display_pipe_cl >> * @vram_base: Base address of the managed video memory >> * @vram_size: Size of the managed video memory in bytes >> * @bdev: The TTM BO device. >> - * @funcs: TTM BO functions >> * >> * The fields drm_vram_mm.vram_base and >> * drm_vram_mm.vrm_size are managed by VRAM MM, but are > -- #Randy
[PATCH] driver core: component: fix spellos
Correct spelling mistakes reported by codespell. Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: dri-devel@lists.freedesktop.org --- drivers/base/component.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/base/component.c b/drivers/base/component.c --- a/drivers/base/component.c +++ b/drivers/base/component.c @@ -751,7 +751,7 @@ static int __component_add(struct device * component_bind_all(). See also component_ops. * * @subcomponent must be nonzero and is used to differentiate between multiple - * components registerd on the same device @dev. These components are match + * components registered on the same device @dev. These components are match * using component_match_add_typed(). * * The component needs to be unregistered at driver unload/disconnect by @@ -781,7 +781,7 @@ EXPORT_SYMBOL_GPL(component_add_typed); * The component needs to be unregistered at driver unload/disconnect by * calling component_del(). * - * See also component_add_typed() for a variant that allows multipled different + * See also component_add_typed() for a variant that allows multiple different * components on the same device. */ int component_add(struct device *dev, const struct component_ops *ops)
[PATCH v2] drm/vram-helper: fix kernel-doc warnings
Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc warning. Use the "define" kernel-doc keyword and an '\' line continuation to fix another kernel-doc warning. drm_gem_vram_helper.h:129: warning: missing initial short description on line: * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- v2: Add commit description base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a include/drm/drm_gem_vram_helper.h |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h --- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str struct drm_plane_state *old_state); /** - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ * Initializes struct drm_plane_helper_funcs for VRAM handling * * Drivers may use GEM BOs as VRAM helpers for the framebuffer memory. This @@ -170,7 +170,6 @@ void drm_gem_vram_simple_display_pipe_cl * @vram_base: Base address of the managed video memory * @vram_size: Size of the managed video memory in bytes * @bdev: The TTM BO device. - * @funcs: TTM BO functions * * The fields drm_vram_mm.vram_base and * drm_vram_mm.vrm_size are managed by VRAM MM, but are
[PATCH] drm/display/dp_mst: remove Excess struct member kernel-doc
Quieten an "Excess struct member" kernel-doc warning by removing the extraneous line. drm_dp_mst_helper.h:156: warning: Excess struct member 'vcpi' description in 'drm_dp_mst_port' Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a include/drm/display/drm_dp_mst_helper.h |1 - 1 file changed, 1 deletion(-) diff -- a/include/drm/display/drm_dp_mst_helper.h b/include/drm/display/drm_dp_mst_helper.h --- a/include/drm/display/drm_dp_mst_helper.h +++ b/include/drm/display/drm_dp_mst_helper.h @@ -83,7 +83,6 @@ struct drm_dp_mst_branch; * @passthrough_aux: parent aux to which DSC pass-through requests should be * sent, only set if DSC pass-through is possible. * @parent: branch device parent of this port - * @vcpi: Virtual Channel Payload info for this port. * @connector: DRM connector this port is connected to. Protected by * _dp_mst_topology_mgr.base.lock. * @mgr: topology manager this port lives under.
[PATCH] drm/vram-helper: fix kernel-doc warnings
drm_gem_vram_helper.h:129: warning: missing initial short description on line: * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a include/drm/drm_gem_vram_helper.h |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h --- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str struct drm_plane_state *old_state); /** - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ * Initializes struct drm_plane_helper_funcs for VRAM handling * * Drivers may use GEM BOs as VRAM helpers for the framebuffer memory. This @@ -170,7 +170,6 @@ void drm_gem_vram_simple_display_pipe_cl * @vram_base: Base address of the managed video memory * @vram_size: Size of the managed video memory in bytes * @bdev: The TTM BO device. - * @funcs: TTM BO functions * * The fields drm_vram_mm.vram_base and * drm_vram_mm.vrm_size are managed by VRAM MM, but are
Re: [PATCH -next] drm/nouveau: uapi: fix kerneldoc warnings
On 1/2/24 19:10, Randy Dunlap wrote: > Hi Vegard, > > On 12/25/23 09:08, Randy Dunlap wrote: >> >> >> On 12/25/23 00:30, Vegard Nossum wrote: >>> >>> On 25/12/2023 08:40, Randy Dunlap wrote: >>>> I do see one thing that I don't like in the generated html output. >>>> It's not a problem with this patch. >>>> The #defines for DRM_NOUVEAU_VM_BIND_OP_MAP etc. have a ';' at the >>>> end of each line: >>>> >>>> struct drm_nouveau_vm_bind_op { >>>> __u32 op; >>>> #define DRM_NOUVEAU_VM_BIND_OP_MAP 0x0; >>>> #define DRM_NOUVEAU_VM_BIND_OP_UNMAP 0x1; >>>> __u32 flags; >>>> #define DRM_NOUVEAU_VM_BIND_SPARSE (1 << 8); >>>> __u32 handle; >>>> __u32 pad; >>>> __u64 addr; >>>> __u64 bo_offset; >>>> __u64 range; >>>> }; >>> >>> Do we actually ever want preprocessor directives to appear inside >>> definitions in the output? If not, I think this should work: >> >> Not necessarily. >> >>> diff --git a/scripts/kernel-doc b/scripts/kernel-doc >>> index 3cdc7dba37e3..61425fc9645e 100755 >>> --- a/scripts/kernel-doc >>> +++ b/scripts/kernel-doc >>> @@ -1259,6 +1259,8 @@ sub dump_struct($$) { >>> $clause =~ s/\s+$//; >>> $clause =~ s/\s+/ /; >>> next if (!$clause); >>> + # skip preprocessor directives >>> + next if $clause =~ m/^#/; >>> $level-- if ($clause =~ m/(\})/ && $level > 1); >>> if (!($clause =~ m/^\s*#/)) { >>> $declaration .= "\t" x $level; >>> >>> >> >> but that didn't work for me. >> I don't have time to look into it any more today. :) > > I retested this patch. I must have really messed up my testing > in the first round. This now LGTM. Thanks. > > Acked-by: Randy Dunlap > Tested-by: Randy Dunlap Vegard, do you plan to submit this as a kernel-doc patch? Thanks. -- #Randy
Re: [PATCH -next] drm/nouveau: uapi: fix kerneldoc warnings
Hi Vegard, On 12/25/23 09:08, Randy Dunlap wrote: > > > On 12/25/23 00:30, Vegard Nossum wrote: >> >> On 25/12/2023 08:40, Randy Dunlap wrote: >>> I do see one thing that I don't like in the generated html output. >>> It's not a problem with this patch. >>> The #defines for DRM_NOUVEAU_VM_BIND_OP_MAP etc. have a ';' at the >>> end of each line: >>> >>> struct drm_nouveau_vm_bind_op { >>> __u32 op; >>> #define DRM_NOUVEAU_VM_BIND_OP_MAP 0x0; >>> #define DRM_NOUVEAU_VM_BIND_OP_UNMAP 0x1; >>> __u32 flags; >>> #define DRM_NOUVEAU_VM_BIND_SPARSE (1 << 8); >>> __u32 handle; >>> __u32 pad; >>> __u64 addr; >>> __u64 bo_offset; >>> __u64 range; >>> }; >> >> Do we actually ever want preprocessor directives to appear inside >> definitions in the output? If not, I think this should work: > > Not necessarily. > >> diff --git a/scripts/kernel-doc b/scripts/kernel-doc >> index 3cdc7dba37e3..61425fc9645e 100755 >> --- a/scripts/kernel-doc >> +++ b/scripts/kernel-doc >> @@ -1259,6 +1259,8 @@ sub dump_struct($$) { >> $clause =~ s/\s+$//; >> $clause =~ s/\s+/ /; >> next if (!$clause); >> + # skip preprocessor directives >> + next if $clause =~ m/^#/; >> $level-- if ($clause =~ m/(\})/ && $level > 1); >> if (!($clause =~ m/^\s*#/)) { >> $declaration .= "\t" x $level; >> >> > > but that didn't work for me. > I don't have time to look into it any more today. :) I retested this patch. I must have really messed up my testing in the first round. This now LGTM. Thanks. Acked-by: Randy Dunlap Tested-by: Randy Dunlap -- #Randy
[PATCH] drm/amd/display: dcn35_hwseq: use common comment to prevent kernel-doc warnings
Change non-kernel-doc comments to use "/*" to prevent warnings from scripts/kernel-doc. dcn35_hwseq.c:1124: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * power down sequence dcn35_hwseq.c:1124: warning: missing initial short description on line: * power down sequence dcn35_hwseq.c:1176: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * power up sequence dcn35_hwseq.c:1176: warning: missing initial short description on line: * power up sequence Signed-off-by: Randy Dunlap Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: Christian König Cc: "Pan, Xinhui" Cc: amd-...@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- I thought that I sent this patch but it's not in the lore archive so I'm sending it again. Apologies if you get it twice. drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c @@ -1120,7 +1120,7 @@ void dcn35_calc_blocks_to_ungate(struct update_state->pg_res_update[PG_HPO] = true; } -/** +/* * power down sequence * ONO Region 3, DCPG 25: hpo - SKIPPED * ONO Region 4, DCPG 0: dchubp0, dpp0 @@ -1172,7 +1172,7 @@ void dcn35_hw_block_power_down(struct dc //domain22, 23, 25 currently always on. } -/** +/* * power up sequence * ONO Region 0, DCPG 22: dccg dio dcio - SKIPPED * ONO Region 2, DCPG 24: mpc opp optc dwb
[PATCH 4/4] drm/nouveau/volt/gk20a: don't misuse kernel-doc comments
Change kernel-doc "/**" comments to common "/*" comments to prevent kernel-doc warnings: gk20a.c:49: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) gk20a.c:49: warning: missing initial short description on line: * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) gk20a.c:62: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * cvb_t_mv = gk20a.c:62: warning: missing initial short description on line: * cvb_t_mv = Signed-off-by: Randy Dunlap Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: nouv...@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c --- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c @@ -45,7 +45,7 @@ static const struct cvb_coef gk20a_cvb_c /* 852 */ { 1608418, -21643, -269, 0,763, -48}, }; -/** +/* * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) */ static inline int @@ -58,7 +58,7 @@ gk20a_volt_get_cvb_voltage(int speedo, i return mv; } -/** +/* * cvb_t_mv = * ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + * ((c3 * speedo / s_scale + c4 + c5 * T / t_scale) * T / t_scale)
[PATCH 2/4] drm/nouveau: don't misuse kernel-doc comments
Change kernel-doc "/**" comments to common "/*" comments to prevent kernel-doc warnings: nouveau_ioc32.c:2: warning: Cannot understand * \file mga_ioc32.c on line 2 - I thought it was a doc line nouveau_ioc32.c:52: warning: Function parameter or member 'filp' not described in 'nouveau_compat_ioctl' nouveau_ioc32.c:52: warning: Function parameter or member 'cmd' not described in 'nouveau_compat_ioctl' nouveau_ioc32.c:52: warning: Function parameter or member 'arg' not described in 'nouveau_compat_ioctl' nouveau_ioc32.c:52: warning: expecting prototype for Called whenever a 32-bit process running under a 64(). Prototype was for nouveau_compat_ioctl() instead Signed-off-by: Randy Dunlap Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: nouv...@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- drivers/gpu/drm/nouveau/nouveau_ioc32.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/nouveau/nouveau_ioc32.c b/drivers/gpu/drm/nouveau/nouveau_ioc32.c --- a/drivers/gpu/drm/nouveau/nouveau_ioc32.c +++ b/drivers/gpu/drm/nouveau/nouveau_ioc32.c @@ -1,4 +1,4 @@ -/** +/* * \file mga_ioc32.c * * 32-bit ioctl compatibility routines for the MGA DRM. @@ -38,7 +38,7 @@ #include "nouveau_ioctl.h" -/** +/* * Called whenever a 32-bit process running under a 64-bit kernel * performs an ioctl on /dev/dri/card. *
[PATCH 3/4] drm/nouveau/gr/gf100: don't misuse kernel-doc comments
Change kernel-doc "/**" comments to common "/*" comments to prevent kernel-doc warnings: gf100.c:1044: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Wait until GR goes idle. GR is considered idle if it is disabled by the gf100.c:1044: warning: missing initial short description on line: * Wait until GR goes idle. GR is considered idle if it is disabled by the Signed-off-by: Randy Dunlap Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: nouv...@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c @@ -1040,7 +1040,7 @@ gf100_gr_zbc_init(struct gf100_gr *gr) } } -/** +/* * Wait until GR goes idle. GR is considered idle if it is disabled by the * MC (0x200) register, or GR is not busy and a context switch is not in * progress.
[PATCH 1/4] drm/nouveau/disp: don't misuse kernel-doc comments
Change kernel-doc "/**" comments to common "/*" comments to prevent kernel-doc warnings: crtc.c:453: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Sets up registers for the given mode/adjusted_mode pair. crtc.c:453: warning: missing initial short description on line: * Sets up registers for the given mode/adjusted_mode pair. crtc.c:629: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Sets up registers for the given mode/adjusted_mode pair. crtc.c:629: warning: missing initial short description on line: * Sets up registers for the given mode/adjusted_mode pair. Signed-off-by: Randy Dunlap Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: nouv...@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- drivers/gpu/drm/nouveau/dispnv04/crtc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -449,7 +449,7 @@ nv_crtc_mode_set_vga(struct drm_crtc *cr regp->Attribute[NV_CIO_AR_CSEL_INDEX] = 0x00; } -/** +/* * Sets up registers for the given mode/adjusted_mode pair. * * The clocks, CRTCs and outputs attached to this CRTC must be off. @@ -625,7 +625,7 @@ nv_crtc_swap_fbs(struct drm_crtc *crtc, return ret; } -/** +/* * Sets up registers for the given mode/adjusted_mode pair. * * The clocks, CRTCs and outputs attached to this CRTC must be off.
[PATCH] drm/msm/dpu: fix kernel-doc warnings
Correct all kernel-doc warnings in dpu_encoder.c and dpu_rm.c: dpu_encoder.c:212: warning: Excess struct member 'crtc_kickoff_cb' description in 'dpu_encoder_virt' dpu_encoder.c:212: warning: Excess struct member 'crtc_kickoff_cb_data' description in 'dpu_encoder_virt' dpu_encoder.c:212: warning: Excess struct member 'debugfs_root' description in 'dpu_encoder_virt' dpu_rm.c:35: warning: Excess struct member 'hw_res' description in 'dpu_rm_requirements' dpu_rm.c:208: warning: No description found for return value of '_dpu_rm_get_lm_peer' Signed-off-by: Randy Dunlap Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul Cc: Marijn Suijten Cc: linux-arm-...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedr...@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Jonathan Corbet Cc: Vegard Nossum -- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c |4 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c |3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff -- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -144,10 +144,6 @@ enum dpu_enc_rc_states { * to track crtc in the disable() hook which is called * _after_ encoder_mask is cleared. * @connector: If a mode is set, cached pointer to the active connector - * @crtc_kickoff_cb: Callback into CRTC that will flush & start - * all CTL paths - * @crtc_kickoff_cb_data: Opaque user data given to crtc_kickoff_cb - * @debugfs_root: Debug file system root file node * @enc_lock: Lock around physical encoder * create/destroy/enable/disable * @frame_busy_mask: Bitmask tracking which phys_enc we are still diff -- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -29,7 +29,6 @@ static inline bool reserved_by_other(uin /** * struct dpu_rm_requirements - Reservation requirements parameter bundle * @topology: selected topology for the display - * @hw_res: Hardware resources required as reported by the encoders */ struct dpu_rm_requirements { struct msm_display_topology topology; @@ -204,6 +203,8 @@ static bool _dpu_rm_needs_split_display( * _dpu_rm_get_lm_peer - get the id of a mixer which is a peer of the primary * @rm: dpu resource manager handle * @primary_idx: index of primary mixer in rm->mixer_blks[] + * + * Returns: lm peer mixed id on success or %-EINVAL on error */ static int _dpu_rm_get_lm_peer(struct dpu_rm *rm, int primary_idx) {
[PATCH] drm/imagination: pvr_device.h: fix all kernel-doc warnings
Correct all kernel-doc notation on pvr_device.h so that there are no kernel-doc warnings remaining. pvr_device.h:292: warning: Excess struct member 'active' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'idle' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'work' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'old_kccb_cmds_executed' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'kccb_stall_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'ccb' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_q' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_obj' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'slot_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'reserved_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'waiters' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'fence_ctx' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'id' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'seqno' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'active' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'idle' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'work' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'old_kccb_cmds_executed' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'kccb_stall_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'ccb' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_q' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_obj' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'slot_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'reserved_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'waiters' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'fence_ctx' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'id' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'seqno' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' Signed-off-by: Randy Dunlap Cc: Frank Binns Cc: Donald Robson Cc: Matt Coster Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Jonathan Corbet Cc: Vegard Nossum --- drivers/gpu/drm/imagination/pvr_device.h | 46 +++-- 1 file changed, 25 insertions(+), 21 deletions(-) diff -- a/drivers/gpu/drm/imagination/pvr_device.h b/drivers/gpu/drm/imagination/pvr_device.h --- a/drivers/gpu/drm/imagination/pvr_device.h +++ b/drivers/gpu/drm/imagination/pvr_device.h @@ -193,13 +193,14 @@ struct pvr_device { * @queues: Queue-related fields. */ struct { - /** @active: Active queue list. */ + /** @queues.active: Active queue list. */ struct list_head active; - /** @idle: Idle queue list. */ + /** @queues.idle: Idle queue list. */ struct list_head idle; - /** @lock: Lock protecting access to the active/idle lists. */ + /** @queues.lock: Lock protecting access to the active/idle +* lists. */ struct mutex lock; } queues; @@ -207,18 +208,18 @@ struct pvr_device { * @watchdog: Watchdog for communications with firmware. */ struct { - /** @work: Work item for watchdog callback. */ + /** @watchdog.work: Work item for watchdog callback. */ struct delayed_work work; /** -* @old_kccb_cmds_executed: KCCB command execution count at last -* watchdog poll. +* @watchdog.old_kccb_cmds_executed: KCCB command execution +* count at last watchdog poll. */ u32 old_kccb_cmds_executed; /** -* @kccb_stall_count: Number
[PATCH] drm/gpuvm: fix all kernel-doc warnings in include/drm/drm_gpuvm.h
Update kernel-doc comments in to correct all kernel-doc warnings: drm_gpuvm.h:148: warning: Excess struct member 'addr' description in 'drm_gpuva' drm_gpuvm.h:148: warning: Excess struct member 'offset' description in 'drm_gpuva' drm_gpuvm.h:148: warning: Excess struct member 'obj' description in 'drm_gpuva' drm_gpuvm.h:148: warning: Excess struct member 'entry' description in 'drm_gpuva' drm_gpuvm.h:148: warning: Excess struct member '__subtree_last' description in 'drm_gpuva' drm_gpuvm.h:192: warning: No description found for return value of 'drm_gpuva_invalidated' drm_gpuvm.h:331: warning: Excess struct member 'tree' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'local_list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'lock' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'local_list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'lock' description in 'drm_gpuvm' drm_gpuvm.h:352: warning: No description found for return value of 'drm_gpuvm_get' drm_gpuvm.h:545: warning: Excess struct member 'fn' description in 'drm_gpuvm_exec' drm_gpuvm.h:545: warning: Excess struct member 'priv' description in 'drm_gpuvm_exec' drm_gpuvm.h:597: warning: missing initial short description on line: * drm_gpuvm_exec_resv_add_fence() drm_gpuvm.h:616: warning: missing initial short description on line: * drm_gpuvm_exec_validate() drm_gpuvm.h:623: warning: No description found for return value of 'drm_gpuvm_exec_validate' drm_gpuvm.h:698: warning: Excess struct member 'gpuva' description in 'drm_gpuvm_bo' drm_gpuvm.h:698: warning: Excess struct member 'entry' description in 'drm_gpuvm_bo' drm_gpuvm.h:698: warning: Excess struct member 'gem' description in 'drm_gpuvm_bo' drm_gpuvm.h:698: warning: Excess struct member 'evict' description in 'drm_gpuvm_bo' drm_gpuvm.h:726: warning: No description found for return value of 'drm_gpuvm_bo_get' drm_gpuvm.h:738: warning: missing initial short description on line: * drm_gpuvm_bo_gem_evict() drm_gpuvm.h:740: warning: missing initial short description on line: * drm_gpuvm_bo_gem_evict() drm_gpuvm.h:698: warning: Excess struct member 'evict' description in 'drm_gpuvm_bo' drm_gpuvm.h:844: warning: Excess struct member 'addr' description in 'drm_gpuva_op_map' drm_gpuvm.h:844: warning: Excess struct member 'range' description in 'drm_gpuva_op_map' drm_gpuvm.h:844: warning: Excess struct member 'offset' description in 'drm_gpuva_op_map' drm_gpuvm.h:844: warning: Excess struct member 'obj' description in 'drm_gpuva_op_map' Signed-off-by: Randy Dunlap Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Jonathan Corbet Cc: Vegard Nossum --- include/drm/drm_gpuvm.h | 80 +- 1 file changed, 45 insertions(+), 35 deletions(-) diff -- a/include/drm/drm_gpuvm.h b/include/drm/drm_gpuvm.h --- a/include/drm/drm_gpuvm.h +++ b/include/drm/drm_gpuvm.h @@ -92,7 +92,7 @@ struct drm_gpuva { */ struct { /** -* @addr: the start address +* @va.addr: the start address */ u64 addr; @@ -107,17 +107,17 @@ struct drm_gpuva { */ struct { /** -* @offset: the offset within the _gem_object +* @gem.offset: the offset within the _gem_object */ u64 offset; /** -* @obj: the mapped _gem_object +* @gem.obj: the mapped _gem_object */ struct drm_gem_object *obj; /** -* @entry: the _head to attach this object to a _gpuvm_bo +* @gem.entry: the _head to attach this object to a _gpuvm_bo */ struct list_head entry; } gem; @@ -127,12 +127,12 @@ struct drm_gpuva { */ struct { /** -* @rb: the rb-tree node +* @rb.node: the rb-tree node */ struct rb_node node; /** -* @entry: The _head to additionally connect _gpuvas +* @rb.entry: The _head to additionally connect _gpuvas * in the same order they appear in the interval tree. This is * useful to keep iterating _gpuvas from a start node found * through the rb-tree while doing modifications on the rb-tree @@ -141,7 +141,7 @@ struct drm_gpuva { struct list_head entry
[PATCH v2.1 2/4] drm/i915/gt: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. intel_gsc.h:34: warning: Excess struct member 'gem_obj' description in 'intel_gsc' Also add missing field member descriptions. Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi Cc: Andi Shyti --- v2: add Reviewed-by: Rodrigo rebase and resend due to (i915) patchwork being down v2.1: reformat to be consistent with kernel-doc in other files (Andi) Please let me know if I should resend all 4 patches as v3. drivers/gpu/drm/i915/gt/intel_gsc.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/i915/gt/intel_gsc.h b/drivers/gpu/drm/i915/gt/intel_gsc.h --- a/drivers/gpu/drm/i915/gt/intel_gsc.h +++ b/drivers/gpu/drm/i915/gt/intel_gsc.h @@ -21,8 +21,11 @@ struct mei_aux_device; /** * struct intel_gsc - graphics security controller * - * @gem_obj: scratch memory GSC operations - * @intf : gsc interface + * @intf: gsc interface + * @intf.adev: MEI aux. device for this @intf + * @intf.gem_obj: scratch memory GSC operations + * @intf.irq: IRQ for this device (%-1 for no IRQ) + * @intf.id: this interface's id number/index */ struct intel_gsc { struct intel_gsc_intf {
Re: [PATCH v2 2/4] drm/i915/gt: reconcile Excess struct member kernel-doc warnings
Hi Andi, On 12/28/23 08:25, Andi Shyti wrote: > Hi Randy, > > ... > >> /** >> * struct intel_gsc - graphics security controller >> * >> - * @gem_obj: scratch memory GSC operations >> - * @intf : gsc interface >> + * @intf : gsc interface >> + * @intf.adev : MEI aux. device for this @intf >> + * @intf.gem_obj : scratch memory GSC operations >> + * @intf.irq : IRQ for this device (%-1 for no IRQ) >> + * @intf.id : this interface's id number/index >> */ > > I don't really like the tabs here and the space before the ':', > which makes it a bit harder to read. Besides it doesn't look > consistent with the rest of the documentation. > > Otherwise, looks good. Yes, one existing line had " : " and somehow I managed to use that on all of the new lines. Not good. I'll redo patch 2/4. Thanks. -- #Randy
Re: [PATCH v2 3/4] drm/i915/guc: reconcile Excess struct member kernel-doc warnings
Hi Andi, On 12/28/23 08:40, Andi Shyti wrote: > Hi Randy, > > [...] > >> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h >> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h >> @@ -105,61 +105,67 @@ struct intel_guc { >> */ > > > struct { } interrupts is missing here. > >> struct { >> /** >> - * @lock: protects everything in submission_state, >> - * ce->guc_id.id, and ce->guc_id.ref when transitioning in and > > [...] > >> + * we start bypassing the schedule disable delay >> */ >> unsigned int sched_disable_gucid_threshold; >> } submission_state; > > Here struct { } send_regs is missing scripts/kernel-doc didn't report any problems with those, but it does appear (to me) to be a kernel-doc bug. :( Thanks. > But as for this patch: > > Reviewed-by: Andi Shyti > > Thanks, > Andi > >> struct { >> /** >> - * @lock: Lock protecting the below fields and the engine stats. >> + * @timestamp.lock: Lock protecting the below fields and > > [...] -- #Randy
[PATCH v2 3/4] drm/i915/guc: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. intel_guc.h:305: warning: Excess struct member 'lock' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'num_guc_ids' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids_bitmap' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_id_list' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids_in_use' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'destroyed_contexts' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'destroyed_worker' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'reset_fail_worker' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'reset_fail_mask' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'sched_disable_delay_ms' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'sched_disable_gucid_threshold' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'lock' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'gt_stamp' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'ping_delay' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'work' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'shift' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'last_stat_jiffies' description in 'intel_guc' 18 warnings as Errors Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi --- v2: add Reviewed-by: Rodrigo rebase and resend due to (i915) patchwork being down drivers/gpu/drm/i915/gt/uc/intel_guc.h | 75 --- 1 file changed, 42 insertions(+), 33 deletions(-) diff -- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h @@ -105,61 +105,67 @@ struct intel_guc { */ struct { /** -* @lock: protects everything in submission_state, -* ce->guc_id.id, and ce->guc_id.ref when transitioning in and -* out of zero +* @submission_state.lock: protects everything in +* submission_state, ce->guc_id.id, and ce->guc_id.ref +* when transitioning in and out of zero */ spinlock_t lock; /** -* @guc_ids: used to allocate new guc_ids, single-lrc +* @submission_state.guc_ids: used to allocate new +* guc_ids, single-lrc */ struct ida guc_ids; /** -* @num_guc_ids: Number of guc_ids, selftest feature to be able -* to reduce this number while testing. +* @submission_state.num_guc_ids: Number of guc_ids, selftest +* feature to be able to reduce this number while testing. */ int num_guc_ids; /** -* @guc_ids_bitmap: used to allocate new guc_ids, multi-lrc +* @submission_state.guc_ids_bitmap: used to allocate +* new guc_ids, multi-lrc */ unsigned long *guc_ids_bitmap; /** -* @guc_id_list: list of intel_context with valid guc_ids but no -* refs +* @submission_state.guc_id_list: list of intel_context +* with valid guc_ids but no refs */ struct list_head guc_id_list; /** -* @guc_ids_in_use: Number single-lrc guc_ids in use +* @submission_state.guc_ids_in_use: Number single-lrc +* guc_ids in use */ unsigned int guc_ids_in_use; /** -* @destroyed_contexts: list of contexts waiting to be destroyed -* (deregistered with the GuC) +* @submission_state.destroyed_contexts: list of contexts +* waiting to be destroyed (deregistered with the GuC) */ struct list_head destroyed_contexts; /** -* @destroyed_worker: worker to deregister contexts, need as we -* need to take a GT PM reference and can't from destroy -* function as it might be in an atomic context
[PATCH v2 4/4] drm/i915/perf: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. i915_perf_types.h:341: warning: Excess struct member 'ptr_lock' description in 'i915_perf_stream' i915_perf_types.h:341: warning: Excess struct member 'head' description in 'i915_perf_stream' i915_perf_types.h:341: warning: Excess struct member 'tail' description in 'i915_perf_stream' 3 warnings as Errors Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi --- v2: add Reviewed-by: Rodrigo rebase and resend due to (i915) patchwork being down drivers/gpu/drm/i915/i915_perf_types.h |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff -- a/drivers/gpu/drm/i915/i915_perf_types.h b/drivers/gpu/drm/i915/i915_perf_types.h --- a/drivers/gpu/drm/i915/i915_perf_types.h +++ b/drivers/gpu/drm/i915/i915_perf_types.h @@ -291,7 +291,8 @@ struct i915_perf_stream { int size_exponent; /** -* @ptr_lock: Locks reads and writes to all head/tail state +* @oa_buffer.ptr_lock: Locks reads and writes to all +* head/tail state * * Consider: the head and tail pointer state needs to be read * consistently from a hrtimer callback (atomic context) and @@ -313,7 +314,8 @@ struct i915_perf_stream { spinlock_t ptr_lock; /** -* @head: Although we can always read back the head pointer register, +* @oa_buffer.head: Although we can always read back +* the head pointer register, * we prefer to avoid trusting the HW state, just to avoid any * risk that some hardware condition could * somehow bump the * head pointer unpredictably and cause us to forward the wrong @@ -322,7 +324,8 @@ struct i915_perf_stream { u32 head; /** -* @tail: The last verified tail that can be read by userspace. +* @oa_buffer.tail: The last verified tail that can be +* read by userspace. */ u32 tail; } oa_buffer;
[PATCH v2 2/4] drm/i915/gt: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. intel_gsc.h:34: warning: Excess struct member 'gem_obj' description in 'intel_gsc' Also add missing field member descriptions. Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi --- v2: add Reviewed-by: Rodrigo rebase and resend due to (i915) patchwork being down drivers/gpu/drm/i915/gt/intel_gsc.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/i915/gt/intel_gsc.h b/drivers/gpu/drm/i915/gt/intel_gsc.h --- a/drivers/gpu/drm/i915/gt/intel_gsc.h +++ b/drivers/gpu/drm/i915/gt/intel_gsc.h @@ -21,8 +21,11 @@ struct mei_aux_device; /** * struct intel_gsc - graphics security controller * - * @gem_obj: scratch memory GSC operations - * @intf : gsc interface + * @intf : gsc interface + * @intf.adev :MEI aux. device for this @intf + * @intf.gem_obj : scratch memory GSC operations + * @intf.irq : IRQ for this device (%-1 for no IRQ) + * @intf.id : this interface's id number/index */ struct intel_gsc { struct intel_gsc_intf {
[PATCH v2 1/4] drm/i915/gem: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. i915_gem_context_types.h:420: warning: Excess struct member 'lock' description in 'i915_gem_context' Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi --- v2: add Reviewed-by: Rodrigo rebase and resend due to (i915) patchwork being down drivers/gpu/drm/i915/gem/i915_gem_context_types.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h --- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h +++ b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h @@ -412,9 +412,9 @@ struct i915_gem_context { /** @stale: tracks stale engines to be destroyed */ struct { - /** @lock: guards engines */ + /** @stale.lock: guards engines */ spinlock_t lock; - /** @engines: list of stale engines */ + /** @stale.engines: list of stale engines */ struct list_head engines; } stale; };
Re: [PATCH 4/4] drm/i915/perf: reconcile Excess struct member kernel-doc warnings
On 12/26/23 09:05, Rodrigo Vivi wrote: > On Wed, Dec 20, 2023 at 07:20:29PM -0800, Randy Dunlap wrote: >> Document nested struct members with full names as described in >> Documentation/doc-guide/kernel-doc.rst. >> >> i915_perf_types.h:341: warning: Excess struct member 'ptr_lock' description >> in 'i915_perf_stream' >> i915_perf_types.h:341: warning: Excess struct member 'head' description in >> 'i915_perf_stream' >> i915_perf_types.h:341: warning: Excess struct member 'tail' description in >> 'i915_perf_stream' >> 3 warnings as Errors >> >> Signed-off-by: Randy Dunlap >> Cc: Jani Nikula >> Cc: Joonas Lahtinen >> Cc: Rodrigo Vivi >> Cc: Tvrtko Ursulin >> Cc: intel-...@lists.freedesktop.org >> Cc: Jonathan Corbet >> Cc: dri-devel@lists.freedesktop.org > > > for the series: > Reviewed-by: Rodrigo Vivi > > I'm afraid patchwork was down when you sent this out. > Could you please rebase and resend? Just to ensure > our CI doesn't complain and then we push it. > Will do. Thanks. -- #Randy
Re: [PATCH -next] drm/nouveau: uapi: fix kerneldoc warnings
On 12/25/23 00:30, Vegard Nossum wrote: > > On 25/12/2023 08:40, Randy Dunlap wrote: >> I do see one thing that I don't like in the generated html output. >> It's not a problem with this patch. >> The #defines for DRM_NOUVEAU_VM_BIND_OP_MAP etc. have a ';' at the >> end of each line: >> >> struct drm_nouveau_vm_bind_op { >> __u32 op; >> #define DRM_NOUVEAU_VM_BIND_OP_MAP 0x0; >> #define DRM_NOUVEAU_VM_BIND_OP_UNMAP 0x1; >> __u32 flags; >> #define DRM_NOUVEAU_VM_BIND_SPARSE (1 << 8); >> __u32 handle; >> __u32 pad; >> __u64 addr; >> __u64 bo_offset; >> __u64 range; >> }; > > Do we actually ever want preprocessor directives to appear inside > definitions in the output? If not, I think this should work: Not necessarily. > diff --git a/scripts/kernel-doc b/scripts/kernel-doc > index 3cdc7dba37e3..61425fc9645e 100755 > --- a/scripts/kernel-doc > +++ b/scripts/kernel-doc > @@ -1259,6 +1259,8 @@ sub dump_struct($$) { > $clause =~ s/\s+$//; > $clause =~ s/\s+/ /; > next if (!$clause); > + # skip preprocessor directives > + next if $clause =~ m/^#/; > $level-- if ($clause =~ m/(\})/ && $level > 1); > if (!($clause =~ m/^\s*#/)) { > $declaration .= "\t" x $level; > > but that didn't work for me. I don't have time to look into it any more today. :) Thanks. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH -next] drm/nouveau: uapi: fix kerneldoc warnings
On 12/24/23 22:51, Vegard Nossum wrote: > As of commit b77fdd6a48e6 ("scripts/kernel-doc: restore warning for > Excess struct/union"), we see the following warnings when running 'make > htmldocs': > > ./include/uapi/drm/nouveau_drm.h:292: warning: Excess struct member > 'DRM_NOUVEAU_VM_BIND_OP_MAP' description in 'drm_nouveau_vm_bind_op' > ./include/uapi/drm/nouveau_drm.h:292: warning: Excess struct member > 'DRM_NOUVEAU_VM_BIND_OP_UNMAP' description in 'drm_nouveau_vm_bind_op' > ./include/uapi/drm/nouveau_drm.h:292: warning: Excess struct member > 'DRM_NOUVEAU_VM_BIND_SPARSE' description in 'drm_nouveau_vm_bind_op' > ./include/uapi/drm/nouveau_drm.h:336: warning: Excess struct member > 'DRM_NOUVEAU_VM_BIND_RUN_ASYNC' description in 'drm_nouveau_vm_bind' > > The problem is that these values are #define constants, but had kerneldoc > comments attached to them as if they were actual struct members. > > There are a number of ways we could fix this, but I chose to draw > inspiration from include/uapi/drm/i915_drm.h, which pulls them into the > corresponding kerneldoc comment for the struct member that they are > intended to be used with. > > To keep the diff readable, there are a number of things I _didn't_ do in > this patch, but which we should also consider: > > - This is pretty good documentation, but it ends up in gpu/driver-uapi, > which is part of subsystem-apis/ when it really ought to display under > userspace-api/ (the "Linux kernel user-space API guide" book of the > documentation). > > - More generally, we might want a warning if include/uapi/ files are > kerneldoc'd outside userspace-api/. > > - I'd consider it cleaner if the #defines appeared between the kerneldoc > for the member and the member itself (which is something other DRM- > related UAPI docs do). > > - The %IDENTIFIER kerneldoc syntax is intended for "constants", and is > more appropriate in this context than ``IDENTIFIER`` or > The DRM docs aren't very consistent on this. > > Cc: Randy Dunlap > Cc: Jonathan Corbet > Signed-off-by: Vegard Nossum This all looks good to me. Thanks for your help. Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap I do see one thing that I don't like in the generated html output. It's not a problem with this patch. The #defines for DRM_NOUVEAU_VM_BIND_OP_MAP etc. have a ';' at the end of each line: struct drm_nouveau_vm_bind_op { __u32 op; #define DRM_NOUVEAU_VM_BIND_OP_MAP 0x0; #define DRM_NOUVEAU_VM_BIND_OP_UNMAP 0x1; __u32 flags; #define DRM_NOUVEAU_VM_BIND_SPARSE (1 << 8); __u32 handle; __u32 pad; __u64 addr; __u64 bo_offset; __u64 range; }; so something else to look into one of these days > --- > include/uapi/drm/nouveau_drm.h | 56 -- > 1 file changed, 27 insertions(+), 29 deletions(-) > > diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h > index 0bade1592f34..c95ef8a4d94a 100644 -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] drm/amd/display: avoid stringop-overflow warnings for dp_decide_lane_settings()
On 11/22/23 14:13, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc prints a warning about a possible array overflow for a couple of > callers of dp_decide_lane_settings() after commit 1b56c90018f0 ("Makefile: > Enable -Wstringop-overflow globally"): > > drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c: > In function 'dp_perform_fixed_vs_pe_training_sequence_legacy': > drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c:426:25: > error: 'dp_decide_lane_settings' accessing 4 bytes in a region of size 1 > [-Werror=stringop-overflow=] > 426 | dp_decide_lane_settings(lt_settings, > dpcd_lane_adjust, > | > ^~ > 427 | > lt_settings->hw_lane_settings, lt_settings->dpcd_lane_settings); > | > ~~~ > drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c:426:25: > note: referencing argument 4 of type 'union dpcd_training_lane[4]' > > I'm not entirely sure what caused this, but changing the prototype to expect > a pointer instead of an array avoids the warnings. > > Fixes: 7727e7b60f82 ("drm/amd/display: Improve robustness of FIXED_VS link > training at DP1 rates") > Signed-off-by: Arnd Bergmann Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Thanks. > --- > .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.c| 2 +- > .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.h| 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c > b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c > index 90339c2dfd84..5a0b04518956 100644 > --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c > +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c > @@ -807,7 +807,7 @@ void dp_decide_lane_settings( > const struct link_training_settings *lt_settings, > const union lane_adjust ln_adjust[LANE_COUNT_DP_MAX], > struct dc_lane_settings hw_lane_settings[LANE_COUNT_DP_MAX], > - union dpcd_training_lane dpcd_lane_settings[LANE_COUNT_DP_MAX]) > + union dpcd_training_lane *dpcd_lane_settings) > { > uint32_t lane; > > diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.h > b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.h > index 7d027bac8255..851bd17317a0 100644 > --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.h > +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.h > @@ -111,7 +111,7 @@ void dp_decide_lane_settings( > const struct link_training_settings *lt_settings, > const union lane_adjust ln_adjust[LANE_COUNT_DP_MAX], > struct dc_lane_settings hw_lane_settings[LANE_COUNT_DP_MAX], > - union dpcd_training_lane dpcd_lane_settings[LANE_COUNT_DP_MAX]); > + union dpcd_training_lane *dpcd_lane_settings); > > enum dc_dp_training_pattern decide_cr_training_pattern( > const struct dc_link_settings *link_settings); -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
[PATCH 1/4] drm/i915/gem: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. i915_gem_context_types.h:420: warning: Excess struct member 'lock' description in 'i915_gem_context' Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/i915/gem/i915_gem_context_types.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h --- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h +++ b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h @@ -412,9 +412,9 @@ struct i915_gem_context { /** @stale: tracks stale engines to be destroyed */ struct { - /** @lock: guards engines */ + /** @stale.lock: guards engines */ spinlock_t lock; - /** @engines: list of stale engines */ + /** @stale.engines: list of stale engines */ struct list_head engines; } stale; };
[PATCH 4/4] drm/i915/perf: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. i915_perf_types.h:341: warning: Excess struct member 'ptr_lock' description in 'i915_perf_stream' i915_perf_types.h:341: warning: Excess struct member 'head' description in 'i915_perf_stream' i915_perf_types.h:341: warning: Excess struct member 'tail' description in 'i915_perf_stream' 3 warnings as Errors Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/i915/i915_perf_types.h |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff -- a/drivers/gpu/drm/i915/i915_perf_types.h b/drivers/gpu/drm/i915/i915_perf_types.h --- a/drivers/gpu/drm/i915/i915_perf_types.h +++ b/drivers/gpu/drm/i915/i915_perf_types.h @@ -291,7 +291,8 @@ struct i915_perf_stream { int size_exponent; /** -* @ptr_lock: Locks reads and writes to all head/tail state +* @oa_buffer.ptr_lock: Locks reads and writes to all +* head/tail state * * Consider: the head and tail pointer state needs to be read * consistently from a hrtimer callback (atomic context) and @@ -313,7 +314,8 @@ struct i915_perf_stream { spinlock_t ptr_lock; /** -* @head: Although we can always read back the head pointer register, +* @oa_buffer.head: Although we can always read back +* the head pointer register, * we prefer to avoid trusting the HW state, just to avoid any * risk that some hardware condition could * somehow bump the * head pointer unpredictably and cause us to forward the wrong @@ -322,7 +324,8 @@ struct i915_perf_stream { u32 head; /** -* @tail: The last verified tail that can be read by userspace. +* @oa_buffer.tail: The last verified tail that can be +* read by userspace. */ u32 tail; } oa_buffer;
[PATCH 2/4] drm/i915/gt: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. intel_gsc.h:34: warning: Excess struct member 'gem_obj' description in 'intel_gsc' Also add missing field member descriptions. Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/i915/gt/intel_gsc.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff -- a/drivers/gpu/drm/i915/gt/intel_gsc.h b/drivers/gpu/drm/i915/gt/intel_gsc.h --- a/drivers/gpu/drm/i915/gt/intel_gsc.h +++ b/drivers/gpu/drm/i915/gt/intel_gsc.h @@ -21,8 +21,11 @@ struct mei_aux_device; /** * struct intel_gsc - graphics security controller * - * @gem_obj: scratch memory GSC operations - * @intf : gsc interface + * @intf : gsc interface + * @intf.adev :MEI aux. device for this @intf + * @intf.gem_obj : scratch memory GSC operations + * @intf.irq : IRQ for this device (%-1 for no IRQ) + * @intf.id : this interface's id number/index */ struct intel_gsc { struct intel_gsc_intf {
[PATCH 3/4] drm/i915/guc: reconcile Excess struct member kernel-doc warnings
Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. intel_guc.h:305: warning: Excess struct member 'lock' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'num_guc_ids' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids_bitmap' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_id_list' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids_in_use' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'destroyed_contexts' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'destroyed_worker' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'reset_fail_worker' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'reset_fail_mask' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'sched_disable_delay_ms' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'sched_disable_gucid_threshold' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'lock' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'gt_stamp' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'ping_delay' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'work' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'shift' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'last_stat_jiffies' description in 'intel_guc' 18 warnings as Errors Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 75 --- 1 file changed, 42 insertions(+), 33 deletions(-) diff -- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h @@ -105,61 +105,67 @@ struct intel_guc { */ struct { /** -* @lock: protects everything in submission_state, -* ce->guc_id.id, and ce->guc_id.ref when transitioning in and -* out of zero +* @submission_state.lock: protects everything in +* submission_state, ce->guc_id.id, and ce->guc_id.ref +* when transitioning in and out of zero */ spinlock_t lock; /** -* @guc_ids: used to allocate new guc_ids, single-lrc +* @submission_state.guc_ids: used to allocate new +* guc_ids, single-lrc */ struct ida guc_ids; /** -* @num_guc_ids: Number of guc_ids, selftest feature to be able -* to reduce this number while testing. +* @submission_state.num_guc_ids: Number of guc_ids, selftest +* feature to be able to reduce this number while testing. */ int num_guc_ids; /** -* @guc_ids_bitmap: used to allocate new guc_ids, multi-lrc +* @submission_state.guc_ids_bitmap: used to allocate +* new guc_ids, multi-lrc */ unsigned long *guc_ids_bitmap; /** -* @guc_id_list: list of intel_context with valid guc_ids but no -* refs +* @submission_state.guc_id_list: list of intel_context +* with valid guc_ids but no refs */ struct list_head guc_id_list; /** -* @guc_ids_in_use: Number single-lrc guc_ids in use +* @submission_state.guc_ids_in_use: Number single-lrc +* guc_ids in use */ unsigned int guc_ids_in_use; /** -* @destroyed_contexts: list of contexts waiting to be destroyed -* (deregistered with the GuC) +* @submission_state.destroyed_contexts: list of contexts +* waiting to be destroyed (deregistered with the GuC) */ struct list_head destroyed_contexts; /** -* @destroyed_worker: worker to deregister contexts, need as we -* need to take a GT PM reference and can't from destroy -* function as it might be in an atomic context (no sleeping) +* @submission_state.destroyed_worker: worker to deregister +* contexts, need as we need to take a GT
Re: [PATCH] drivers: video: logo: use %u format specifier for unsigned int values
On 12/19/23 07:14, Colin Ian King wrote: > Currently the %d format specifier is being used for unsigned int values. > Fix this by using the correct %u format specifier. Cleans up cppcheck > warnings: > > warning: %d in format string (no. 1) requires 'int' but the argument > type is 'unsigned int'. [invalidPrintfArgType_sint] > > Signed-off-by: Colin Ian King Reviewed-by: Randy Dunlap Thanks. > --- > drivers/video/logo/pnmtologo.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/video/logo/pnmtologo.c b/drivers/video/logo/pnmtologo.c > index ada5ef6e51b7..2434a25afb64 100644 > --- a/drivers/video/logo/pnmtologo.c > +++ b/drivers/video/logo/pnmtologo.c > @@ -249,10 +249,10 @@ static void write_footer(void) > fputs("\n};\n\n", out); > fprintf(out, "const struct linux_logo %s __initconst = {\n", logoname); > fprintf(out, "\t.type\t\t= %s,\n", logo_types[logo_type]); > - fprintf(out, "\t.width\t\t= %d,\n", logo_width); > - fprintf(out, "\t.height\t\t= %d,\n", logo_height); > + fprintf(out, "\t.width\t\t= %u,\n", logo_width); > + fprintf(out, "\t.height\t\t= %u,\n", logo_height); > if (logo_type == LINUX_LOGO_CLUT224) { > - fprintf(out, "\t.clutsize\t= %d,\n", logo_clutsize); > + fprintf(out, "\t.clutsize\t= %u,\n", logo_clutsize); > fprintf(out, "\t.clut\t\t= %s_clut,\n", logoname); > } > fprintf(out, "\t.data\t\t= %s_data\n", logoname); -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
[PATCH] drm/nouveau/bios/init: drop kernel-doc notation
The "/**" comments in this file are not kernel-doc comments. They are used on static functions which can have kernel-doc comments, but that is not the primary focus of kernel-doc comments. Since these comments are incomplete for kernel-doc notation, remove the kernel-doc "/**" markers and make them common comments. This prevents scripts/kernel-doc from issuing 68 warnings: init.c:584: warning: Function parameter or member 'init' not described in 'init_reserved' and 67 warnings like this one: init.c:611: warning: expecting prototype for INIT_DONE(). Prototype was for init_done() instead Signed-off-by: Randy Dunlap Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: dri-devel@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 136 +++--- 1 file changed, 68 insertions(+), 68 deletions(-) diff -- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c @@ -575,7 +575,7 @@ init_tmds_reg(struct nvbios_init *init, * init opcode handlers */ -/** +/* * init_reserved - stub for various unknown/unused single-byte opcodes * */ @@ -602,7 +602,7 @@ init_reserved(struct nvbios_init *init) init->offset += length; } -/** +/* * INIT_DONE - opcode 0x71 * */ @@ -613,7 +613,7 @@ init_done(struct nvbios_init *init) init->offset = 0x; } -/** +/* * INIT_IO_RESTRICT_PROG - opcode 0x32 * */ @@ -650,7 +650,7 @@ init_io_restrict_prog(struct nvbios_init trace("}]\n"); } -/** +/* * INIT_REPEAT - opcode 0x33 * */ @@ -676,7 +676,7 @@ init_repeat(struct nvbios_init *init) init->repeat = repeat; } -/** +/* * INIT_IO_RESTRICT_PLL - opcode 0x34 * */ @@ -716,7 +716,7 @@ init_io_restrict_pll(struct nvbios_init trace("}]\n"); } -/** +/* * INIT_END_REPEAT - opcode 0x36 * */ @@ -732,7 +732,7 @@ init_end_repeat(struct nvbios_init *init } } -/** +/* * INIT_COPY - opcode 0x37 * */ @@ -759,7 +759,7 @@ init_copy(struct nvbios_init *init) init_wrvgai(init, port, index, data); } -/** +/* * INIT_NOT - opcode 0x38 * */ @@ -771,7 +771,7 @@ init_not(struct nvbios_init *init) init_exec_inv(init); } -/** +/* * INIT_IO_FLAG_CONDITION - opcode 0x39 * */ @@ -788,7 +788,7 @@ init_io_flag_condition(struct nvbios_ini init_exec_set(init, false); } -/** +/* * INIT_GENERIC_CONDITION - opcode 0x3a * */ @@ -840,7 +840,7 @@ init_generic_condition(struct nvbios_ini } } -/** +/* * INIT_IO_MASK_OR - opcode 0x3b * */ @@ -859,7 +859,7 @@ init_io_mask_or(struct nvbios_init *init init_wrvgai(init, 0x03d4, index, data &= ~(1 << or)); } -/** +/* * INIT_IO_OR - opcode 0x3c * */ @@ -878,7 +878,7 @@ init_io_or(struct nvbios_init *init) init_wrvgai(init, 0x03d4, index, data | (1 << or)); } -/** +/* * INIT_ANDN_REG - opcode 0x47 * */ @@ -895,7 +895,7 @@ init_andn_reg(struct nvbios_init *init) init_mask(init, reg, mask, 0); } -/** +/* * INIT_OR_REG - opcode 0x48 * */ @@ -912,7 +912,7 @@ init_or_reg(struct nvbios_init *init) init_mask(init, reg, 0, mask); } -/** +/* * INIT_INDEX_ADDRESS_LATCHED - opcode 0x49 * */ @@ -942,7 +942,7 @@ init_idx_addr_latched(struct nvbios_init } } -/** +/* * INIT_IO_RESTRICT_PLL2 - opcode 0x4a * */ @@ -977,7 +977,7 @@ init_io_restrict_pll2(struct nvbios_init trace("}]\n"); } -/** +/* * INIT_PLL2 - opcode 0x4b * */ @@ -994,7 +994,7 @@ init_pll2(struct nvbios_init *init) init_prog_pll(init, reg, freq); } -/** +/* * INIT_I2C_BYTE - opcode 0x4c * */ @@ -1025,7 +1025,7 @@ init_i2c_byte(struct nvbios_init *init) } } -/** +/* * INIT_ZM_I2C_BYTE - opcode 0x4d * */ @@ -1051,7 +1051,7 @@ init_zm_i2c_byte(struct nvbios_init *ini } } -/** +/* * INIT_ZM_I2C - opcode 0x4e * */ @@ -1085,7 +1085,7 @@ init_zm_i2c(struct nvbios_init *init) } } -/** +/* * INIT_TMDS - opcode 0x4f * */ @@ -,7 +,7 @@ init_tmds(struct nvbios_init *init) init_wr32(init, reg + 0, addr); } -/** +/* * INIT_ZM_TMDS_GROUP - opcode 0x50 * */ @@ -1138,7 +1138,7 @@ init_zm_tmds_group(struct nvbios_init *i } } -/** +/* * INIT_CR_INDEX_ADDRESS_LATCHED - opcode 0x51 * */ @@ -1168,7 +1168,7 @@ init_cr_idx_adr_latch(struct nvbios_init init_wrvgai(init, 0x03d4, addr0, save0); } -/** +/* * INIT_CR - opcode 0x52 * */ @@ -1188,7 +1188,7 @@ init_cr(struct nvbios_init *init) init_wrvgai(init, 0x03d4, addr,
[PATCH] drm/vmwgfx: fix kernel-doc Excess struct member 'base'
Fix a new kernel-doc warning reported by kernel test robot: vmwgfx_surface.c:55: warning: Excess struct member 'base' description in 'vmw_user_surface' The other warning is not correct: it is confused by "__counted_by". Kees has made a separate patch for that. In -Wall mode, kernel-doc still reports 20 warnings of this nature: vmwgfx_surface.c:198: warning: No description found for return value of 'vmw_surface_dma_size' but I am not addressing those. Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312150701.kni9lum3-...@intel.com/ Cc: Kees Cook Cc: Zack Rusin Cc: VMware Graphics Reviewers Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c |1 - 1 file changed, 1 deletion(-) diff -- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c --- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c @@ -44,7 +44,6 @@ * struct vmw_user_surface - User-space visible surface resource * * @prime: The TTM prime object. - * @base: The TTM base object handling user-space visibility. * @srf:The surface metadata. * @master: Master of the creating client. Used for security check. */
[PATCH] drm/vmwgfx: fix all kernel-doc warnings in stdu
kernel test robot reports one kernel-doc warning in stdu, but running scripts/kernel-doc in -Wall mode reports several more, so fix all of them at one time: vmwgfx_stdu.c:76: warning: Excess struct member 'transfer' description in 'vmw_stdu_dirty' vmwgfx_stdu.c:103: warning: missing initial short description on line: * struct vmw_screen_target_display_unit vmwgfx_stdu.c:215: warning: No description found for return value of 'vmw_stdu_bind_st' vmwgfx_stdu.c:320: warning: No description found for return value of 'vmw_stdu_destroy_st' vmwgfx_stdu.c:551: warning: No description found for return value of 'vmw_kms_stdu_readback' vmwgfx_stdu.c:719: warning: No description found for return value of 'vmw_kms_stdu_surface_dirty' vmwgfx_stdu.c:895: warning: No description found for return value of 'vmw_stdu_primary_plane_prepare_fb' vmwgfx_stdu.c:1470: warning: No description found for return value of 'vmw_stdu_init' Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312150347.5iceznlk-...@intel.com/ Cc: Zack Rusin Cc: VMware Graphics Reviewers Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff -- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c @@ -53,7 +53,6 @@ enum stdu_content_type { * struct vmw_stdu_dirty - closure structure for the update functions * * @base: The base type we derive from. Used by vmw_kms_helper_dirty(). - * @transfer: Transfer direction for DMA command. * @left: Left side of bounding box. * @right: Right side of bounding box. * @top: Top side of bounding box. @@ -100,7 +99,7 @@ struct vmw_stdu_update_gb_image { }; /** - * struct vmw_screen_target_display_unit + * struct vmw_screen_target_display_unit - conglomerated STDU structure * * @base: VMW specific DU structure * @display_srf: surface to be displayed. The dimension of this will always @@ -208,6 +207,8 @@ static int vmw_stdu_define_st(struct vmw * @res: Buffer to bind to the screen target. Set to NULL to blank screen. * * Binding a surface to a Screen Target the same as flipping + * + * Returns: %0 on success or -errno code on failure */ static int vmw_stdu_bind_st(struct vmw_private *dev_priv, struct vmw_screen_target_display_unit *stdu, @@ -314,6 +315,9 @@ static int vmw_stdu_update_st(struct vmw * * @dev_priv: VMW DRM device * @stdu: display unit to destroy + * + * Returns: %0 on success, negative error code on failure. -ERESTARTSYS if + * interrupted. */ static int vmw_stdu_destroy_st(struct vmw_private *dev_priv, struct vmw_screen_target_display_unit *stdu) @@ -536,7 +540,8 @@ static void vmw_stdu_bo_cpu_commit(struc * If DMA-ing till the screen target system, the function will also notify * the screen target system that a bounding box of the cliprects has been * updated. - * Returns 0 on success, negative error code on failure. -ERESTARTSYS if + * + * Returns: %0 on success, negative error code on failure. -ERESTARTSYS if * interrupted. */ int vmw_kms_stdu_readback(struct vmw_private *dev_priv, @@ -703,7 +708,7 @@ static void vmw_kms_stdu_surface_fifo_co * case the device has already synchronized. * @crtc: If crtc is passed, perform surface dirty on that crtc only. * - * Returns 0 on success, negative error code on failure. -ERESTARTSYS if + * Returns: %0 on success, negative error code on failure. -ERESTARTSYS if * interrupted. */ int vmw_kms_stdu_surface_dirty(struct vmw_private *dev_priv, @@ -887,7 +892,7 @@ vmw_stdu_primary_plane_cleanup_fb(struct * backed by a buffer object. The display surface is pinned here, and it'll * be unpinned in .cleanup_fb() * - * Returns 0 on success + * Returns: %0 on success */ static int vmw_stdu_primary_plane_prepare_fb(struct drm_plane *plane, @@ -1465,6 +1470,8 @@ static const struct drm_crtc_helper_func * This function is called once per CRTC, and allocates one Screen Target * display unit to represent that CRTC. Since the SVGA device does not separate * out encoder and connector, they are represented as part of the STDU as well. + * + * Returns: %0 on success or -errno code on failure */ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) {
Re: [PATCH V2] drivers: gpu: drm: vmwgfx: fixed typos
Hi-- On 12/14/23 22:01, Ghanshyam Agrawal wrote: > Fixed multiple typos in vmwgfx_execbuf.c > > Signed-off-by: Ghanshyam Agrawal > --- > V2: > Fixed some more typos suggested by codespell > and the community. > > V1: > Fixed multiple typos > > drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c > b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c > index 36987ef3fc30..76aa72e8be73 100644 > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c > @@ -127,7 +127,7 @@ struct vmw_ctx_validation_info { > * @func: Call-back to handle the command. > * @user_allow: Whether allowed from the execbuf ioctl. > * @gb_disable: Whether disabled if guest-backed objects are available. > - * @gb_enable: Whether enabled iff guest-backed objects are available. > + * @gb_enable: Whether enabled if guest-backed objects are available. "iff" normally means "if and only if" and its use in the kernel sources is usually not a mistake. However, this one sounds dodgy to me (before your change), so it's OK IMO. Also, the line above it uses "if" for a similar comment. Maybe someone else knows better. > * @cmd_name: Name of the command. > */ > struct vmw_cmd_entry { > @@ -621,10 +621,10 @@ static int vmw_resources_reserve(struct vmw_sw_context > *sw_context) > * @sw_context: Pointer to the software context. > * @res_type: Resource type. > * @dirty: Whether to change dirty status. > - * @converter: User-space visisble type specific information. > + * @converter: User-space visible type specific information. > * @id_loc: Pointer to the location in the command buffer currently being > parsed > * from where the user-space resource id handle is located. > - * @p_res: Pointer to pointer to resource validalidation node. Populated on > + * @p_res: Pointer to pointer to resource validation node. Populated on > * exit. > */ > static int > @@ -1069,7 +1069,7 @@ static int vmw_query_bo_switch_prepare(struct > vmw_private *dev_priv, > * object following that query wait has signaled, we are sure that all > preceding > * queries have finished, and the old query buffer can be unpinned. However, > * since both the new query buffer and the old one are fenced with that > fence, > - * we can do an asynchronus unpin now, and be sure that the old query buffer > + * we can do an asynchronous unpin now, and be sure that the old query buffer > * won't be moved until the fence has signaled. > * > * As mentioned above, both the new - and old query buffers need to be fenced Acked-by: Randy Dunlap thanks. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] drivers: gpu: drm: vmwgfx: fixed typos
On 12/14/23 21:30, Ghanshyam Agrawal wrote: > Fixed some typos in vmwgfx_execbuf.c > > Signed-off-by: Ghanshyam Agrawal > --- > drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c > b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c > index 36987ef3fc30..272141b6164c 100644 > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c > @@ -621,10 +621,10 @@ static int vmw_resources_reserve(struct vmw_sw_context > *sw_context) > * @sw_context: Pointer to the software context. > * @res_type: Resource type. > * @dirty: Whether to change dirty status. > - * @converter: User-space visisble type specific information. > + * @converter: User-space visible type specific information. ack. > * @id_loc: Pointer to the location in the command buffer currently being > parsed > * from where the user-space resource id handle is located. > - * @p_res: Pointer to pointer to resource validalidation node. Populated on > + * @p_res: Pointer to pointer to resource validation node. Populated on > * exit. ack. > */ > static int Please also fix this one: vmwgfx_execbuf.c:1072: asynchronus ==> asynchronous I suggest that you try codespell. Thanks. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
Re: [PATCH] gpu: drm: amd: fixed typos
Hi-- On 12/14/23 21:20, Ghanshyam Agrawal wrote: > Fixed multiple typos in atomfirmware.h > > Signed-off-by: Ghanshyam Agrawal > --- > drivers/gpu/drm/amd/include/atomfirmware.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h > b/drivers/gpu/drm/amd/include/atomfirmware.h > index fa7d6ced786f..41d553921adf 100644 > --- a/drivers/gpu/drm/amd/include/atomfirmware.h > +++ b/drivers/gpu/drm/amd/include/atomfirmware.h > @@ -210,7 +210,7 @@ atom_bios_string = "ATOM" > }; > */ > > -#pragma pack(1) /* BIOS data must use byte > aligment*/ > +#pragma pack(1) /* BIOS data must use byte > alignment */ > > enum atombios_image_offset{ >OFFSET_TO_ATOM_ROM_HEADER_POINTER = 0x0048, > @@ -452,7 +452,7 @@ struct atom_dtd_format >uint8_t refreshrate; > }; > > -/* atom_dtd_format.modemiscinfo defintion */ > +/* atom_dtd_format.modemiscinfo definition */ > enum atom_dtd_format_modemiscinfo{ >ATOM_HSYNC_POLARITY= 0x0002, >ATOM_VSYNC_POLARITY= 0x0004, > @@ -645,7 +645,7 @@ struct lcd_info_v2_1 >uint32_t reserved1[8]; > }; > > -/* lcd_info_v2_1.panel_misc defintion */ > +/* lcd_info_v2_1.panel_misc definition */ > enum atom_lcd_info_panel_misc{ >ATOM_PANEL_MISC_FPDI=0x0002, > }; > @@ -683,7 +683,7 @@ enum atom_gpio_pin_assignment_gpio_id { >/* gpio_id pre-define id for multiple usage */ >/* GPIO use to control PCIE_VDDC in certain SLT board */ >PCIE_VDDC_CONTROL_GPIO_PINID = 56, > - /* if PP_AC_DC_SWITCH_GPIO_PINID in Gpio_Pin_LutTable, AC/DC swithing > feature is enable */ > + /* if PP_AC_DC_SWITCH_GPIO_PINID in Gpio_Pin_LutTable, AC/DC switching > feature is enable */ s/enable/enabled/ >PP_AC_DC_SWITCH_GPIO_PINID = 60, >/* VDDC_REGULATOR_VRHOT_GPIO_PINID in Gpio_Pin_LutTable, VRHot feature is > enable */ Ditto. There may be a few more that need this same treatment. >VDDC_VRHOT_GPIO_PINID = 61, The other changes look good as far as they go, but codespell reports a few more misspellings to consider: atomfirmware.h:213: aligment ==> alignment atomfirmware.h:257: Offest ==> Offset atomfirmware.h:258: Offest ==> Offset atomfirmware.h:390: Offest ==> Offset atomfirmware.h:455: defintion ==> definition atomfirmware.h:648: defintion ==> definition atomfirmware.h:686: swithing ==> switching atomfirmware.h:704: calcualted ==> calculated atomfirmware.h:967: compability ==> compatibility atomfirmware.h:981: intenal ==> internal atomfirmware.h:993: intenal ==> internal atomfirmware.h:3469: sequece ==> sequence atomfirmware.h:3507: indiate ==> indicate atomfirmware.h:4429: stucture ==> structure atomfirmware.h:4430: stucture ==> structure atomfirmware.h:4462: regiser ==> register thanks. -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html
[PATCH] drm/uapi: drm_mode.h: fix spellos and grammar
Correct spellos reported by codespell. Fix some grammar (as 's' to a few words). Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- include/uapi/drm/drm_mode.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff -- a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -36,10 +36,10 @@ extern "C" { /** * DOC: overview * - * DRM exposes many UAPI and structure definition to have a consistent - * and standardized interface with user. + * DRM exposes many UAPI and structure definitions to have a consistent + * and standardized interface with users. * Userspace can refer to these structure definitions and UAPI formats - * to communicate to driver + * to communicate to drivers. */ #define DRM_CONNECTOR_NAME_LEN 32 @@ -540,7 +540,7 @@ struct drm_mode_get_connector { /* the PROP_ATOMIC flag is used to hide properties from userspace that * is not aware of atomic properties. This is mostly to work around * older userspace (DDX drivers) that read/write each prop they find, - * witout being aware that this could be triggering a lengthy modeset. + * without being aware that this could be triggering a lengthy modeset. */ #define DRM_MODE_PROP_ATOMIC0x8000 @@ -664,7 +664,7 @@ struct drm_mode_fb_cmd { }; #define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */ -#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */ +#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifier[] */ /** * struct drm_mode_fb_cmd2 - Frame-buffer metadata. @@ -881,8 +881,8 @@ struct hdr_metadata_infoframe { * These are coded as unsigned 16-bit values in units of * 0.2, where 0x represents zero and 0xC350 * represents 1.. -* @display_primaries.x: X cordinate of color primary. -* @display_primaries.y: Y cordinate of color primary. +* @display_primaries.x: X coordinate of color primary. +* @display_primaries.y: Y coordinate of color primary. */ struct { __u16 x, y; @@ -892,8 +892,8 @@ struct hdr_metadata_infoframe { * These are coded as unsigned 16-bit values in units of * 0.2, where 0x represents zero and 0xC350 * represents 1.. -* @white_point.x: X cordinate of whitepoint of color primary. -* @white_point.y: Y cordinate of whitepoint of color primary. +* @white_point.x: X coordinate of whitepoint of color primary. +* @white_point.y: Y coordinate of whitepoint of color primary. */ struct { __u16 x, y;
[PATCH] drm/i915/uapi: fix typos/spellos and punctuation
Use "its" for possessive form instead of "it's". Hyphenate multi-word adjectives. Correct some spelling. End one line of code with ';' instead of ','. The before and after object files are identical. Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-...@lists.freedesktop.org --- include/uapi/drm/i915_drm.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff -- a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h --- a/include/uapi/drm/i915_drm.h +++ b/include/uapi/drm/i915_drm.h @@ -693,7 +693,7 @@ typedef struct drm_i915_irq_wait { #define I915_PARAM_HAS_EXEC_FENCE 44 /* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to capture - * user specified bufffers for post-mortem debugging of GPU hangs. See + * user-specified buffers for post-mortem debugging of GPU hangs. See * EXEC_OBJECT_CAPTURE. */ #define I915_PARAM_HAS_EXEC_CAPTURE 45 @@ -1606,7 +1606,7 @@ struct drm_i915_gem_busy { * is accurate. * * The returned dword is split into two fields to indicate both -* the engine classess on which the object is being read, and the +* the engine classes on which the object is being read, and the * engine class on which it is currently being written (if any). * * The low word (bits 0:15) indicate if the object is being written @@ -1815,7 +1815,7 @@ struct drm_i915_gem_madvise { __u32 handle; /* Advice: either the buffer will be needed again in the near future, -* or wont be and could be discarded under memory pressure. +* or won't be and could be discarded under memory pressure. */ __u32 madv; @@ -3246,7 +3246,7 @@ struct drm_i915_query_topology_info { * // enough to hold our array of engines. The kernel will fill out the * // item.length for us, which is the number of bytes we need. * // - * // Alternatively a large buffer can be allocated straight away enabling + * // Alternatively a large buffer can be allocated straightaway enabling * // querying in one pass, in which case item.length should contain the * // length of the provided buffer. * err = ioctl(fd, DRM_IOCTL_I915_QUERY, ); @@ -3256,7 +3256,7 @@ struct drm_i915_query_topology_info { * // Now that we allocated the required number of bytes, we call the ioctl * // again, this time with the data_ptr pointing to our newly allocated * // blob, which the kernel can then populate with info on all engines. - * item.data_ptr = (uintptr_t), + * item.data_ptr = (uintptr_t) * * err = ioctl(fd, DRM_IOCTL_I915_QUERY, ); * if (err) ... @@ -3286,7 +3286,7 @@ struct drm_i915_query_topology_info { /** * struct drm_i915_engine_info * - * Describes one engine and it's capabilities as known to the driver. + * Describes one engine and its capabilities as known to the driver. */ struct drm_i915_engine_info { /** @engine: Engine class and instance. */
[PATCH] drm/fourcc: fix spelling/typos
Correct spelling mistakes that were identified by codespell. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- include/uapi/drm/drm_fourcc.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff -- a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -54,7 +54,7 @@ extern "C" { * Format modifiers may change any property of the buffer, including the number * of planes and/or the required allocation size. Format modifiers are * vendor-namespaced, and as such the relationship between a fourcc code and a - * modifier is specific to the modifer being used. For example, some modifiers + * modifier is specific to the modifier being used. For example, some modifiers * may preserve meaning - such as number of planes - from the fourcc code, * whereas others may not. * @@ -79,7 +79,7 @@ extern "C" { * format. * - Higher-level programs interfacing with KMS/GBM/EGL/Vulkan/etc: these users * see modifiers as opaque tokens they can check for equality and intersect. - * These users musn't need to know to reason about the modifier value + * These users mustn't need to know to reason about the modifier value * (i.e. they are not expected to extract information out of the modifier). * * Vendors should document their modifier usage in as much detail as @@ -540,7 +540,7 @@ extern "C" { * This is a tiled layout using 4Kb tiles in row-major layout. * Within the tile pixels are laid out in 16 256 byte units / sub-tiles which * are arranged in four groups (two wide, two high) with column-major layout. - * Each group therefore consits out of four 256 byte units, which are also laid + * Each group therefore consists out of four 256 byte units, which are also laid * out as 2x2 column-major. * 256 byte units are made out of four 64 byte blocks of pixels, producing * either a square block or a 2:1 unit. @@ -1103,7 +1103,7 @@ drm_fourcc_canonicalize_nvidia_format_mo */ /* - * The top 4 bits (out of the 56 bits alloted for specifying vendor specific + * The top 4 bits (out of the 56 bits allotted for specifying vendor specific * modifiers) denote the category for modifiers. Currently we have three * categories of modifiers ie AFBC, MISC and AFRC. We can have a maximum of * sixteen different categories. @@ -1419,7 +1419,7 @@ drm_fourcc_canonicalize_nvidia_format_mo * Amlogic FBC Memory Saving mode * * Indicates the storage is packed when pixel size is multiple of word - * boudaries, i.e. 8bit should be stored in this mode to save allocation + * boundaries, i.e. 8bit should be stored in this mode to save allocation * memory. * * This mode reduces body layout to 3072 bytes per 64x32 superblock with
[PATCH] iosys-map: fix typos
Correct spellos/typos in comments. Signed-off-by: Randy Dunlap Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org --- include/linux/iosys-map.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/include/linux/iosys-map.h b/include/linux/iosys-map.h --- a/include/linux/iosys-map.h +++ b/include/linux/iosys-map.h @@ -34,7 +34,7 @@ * the same driver for allocation, read and write operations. * * Open-coding access to :c:type:`struct iosys_map ` is considered - * bad style. Rather then accessing its fields directly, use one of the provided + * bad style. Rather than accessing its fields directly, use one of the provided * helper functions, or implement your own. For example, instances of * :c:type:`struct iosys_map ` can be initialized statically with * IOSYS_MAP_INIT_VADDR(), or at runtime with iosys_map_set_vaddr(). These @@ -85,7 +85,7 @@ * if (iosys_map_is_equal(_map, _map)) * // always false * - * A set up instance of struct iosys_map can be used to access or manipulate the + * A setup instance of struct iosys_map can be used to access or manipulate the * buffer memory. Depending on the location of the memory, the provided helpers * will pick the correct operations. Data can be copied into the memory with * iosys_map_memcpy_to(). The address can be manipulated with iosys_map_incr().
[PATCH] drm/drm_modeset_helper_vtables.h: fix typos/spellos
Fix spelling problems as identified by codespell. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann --- include/drm/drm_modeset_helper_vtables.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -- a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -134,7 +134,7 @@ struct drm_crtc_helper_funcs { * Since this function is both called from the check phase of an atomic * commit, and the mode validation in the probe paths it is not allowed * to look at anything else but the passed-in mode, and validate it -* against configuration-invariant hardward constraints. Any further +* against configuration-invariant hardware constraints. Any further * limits which depend upon the configuration can only be checked in * @mode_fixup or @atomic_check. * @@ -550,7 +550,7 @@ struct drm_encoder_helper_funcs { * Since this function is both called from the check phase of an atomic * commit, and the mode validation in the probe paths it is not allowed * to look at anything else but the passed-in mode, and validate it -* against configuration-invariant hardward constraints. Any further +* against configuration-invariant hardware constraints. Any further * limits which depend upon the configuration can only be checked in * @mode_fixup or @atomic_check. * @@ -1474,7 +1474,7 @@ struct drm_mode_config_helper_funcs { * swapped into the various state pointers. The passed in state * therefore contains copies of the old/previous state. This hook should * commit the new state into hardware. Note that the helpers have -* already waited for preceeding atomic commits and fences, but drivers +* already waited for preceding atomic commits and fences, but drivers * can add more waiting calls at the start of their implementation, e.g. * to wait for driver-internal request for implicit syncing, before * starting to commit the update to the hardware.
Re: [PATCH] drm/panel: re-alphabetize the menu list
On 12/7/23 01:52, Aradhya Bhatia wrote: > Hi Randy, > > Thanks for the patch! > > On 07/12/23 11:52, Randy Dunlap wrote: >> A few of the DRM_PANEL entries have become out of alphabetical order, >> so move them around a bit to restore alpha order. >> >> Signed-off-by: Randy Dunlap >> Cc: Neil Armstrong >> Cc: Jessica Zhang >> Cc: Sam Ravnborg >> Cc: Maarten Lankhorst >> Cc: Maxime Ripard >> Cc: Thomas Zimmermann >> Cc: David Airlie >> Cc: Daniel Vetter >> Cc: dri-devel@lists.freedesktop.org >> --- >> drivers/gpu/drm/panel/Kconfig | 90 >> 1 file changed, 45 insertions(+), 45 deletions(-) >> >> diff -- a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig >> --- a/drivers/gpu/drm/panel/Kconfig >> +++ b/drivers/gpu/drm/panel/Kconfig >> @@ -95,34 +95,6 @@ config DRM_PANEL_LVDS >>handling of power supplies or control signals. It implements automatic >>backlight handling if the panel is attached to a backlight controller. >> >> -config DRM_PANEL_SIMPLE >> -tristate "support for simple panels (other than eDP ones)" >> -depends on OF >> -depends on BACKLIGHT_CLASS_DEVICE >> -depends on PM >> -select VIDEOMODE_HELPERS >> -help >> - DRM panel driver for dumb non-eDP panels that need at most a regulator >> - and a GPIO to be powered up. Optionally a backlight can be attached so >> - that it can be automatically turned off when the panel goes into a >> - low power state. >> - >> -config DRM_PANEL_EDP >> -tristate "support for simple Embedded DisplayPort panels" >> -depends on OF >> -depends on BACKLIGHT_CLASS_DEVICE >> -depends on PM >> -select VIDEOMODE_HELPERS >> -select DRM_DISPLAY_DP_HELPER >> -select DRM_DISPLAY_HELPER >> -select DRM_DP_AUX_BUS >> -select DRM_KMS_HELPER >> -help >> - DRM panel driver for dumb eDP panels that need at most a regulator and >> - a GPIO to be powered up. Optionally a backlight can be attached so >> - that it can be automatically turned off when the panel goes into a >> - low power state. >> - >> config DRM_PANEL_EBBG_FT8719 >> tristate "EBBG FT8719 panel driver" >> depends on OF >> @@ -317,12 +289,6 @@ config DRM_PANEL_LEADTEK_LTK500HD1829 >>24 bit RGB per pixel. It provides a MIPI DSI interface to >>the host and has a built-in LED backlight. >> >> -config DRM_PANEL_SAMSUNG_LD9040 >> -tristate "Samsung LD9040 RGB/SPI panel" >> -depends on OF && SPI >> -depends on BACKLIGHT_CLASS_DEVICE >> -select VIDEOMODE_HELPERS >> - >> config DRM_PANEL_LG_LB035Q02 >> tristate "LG LB035Q024573 RGB panel" >> depends on GPIOLIB && OF && SPI >> @@ -350,6 +316,17 @@ config DRM_PANEL_MAGNACHIP_D53E6EA8966 >>with the Magnachip D53E6EA8966 panel IC. This panel receives >>video data via DSI but commands via 9-bit SPI using DBI. >> >> +config DRM_PANEL_MANTIX_MLAF057WE51 >> +tristate "Mantix MLAF057WE51-X MIPI-DSI LCD panel" >> +depends on OF >> +depends on DRM_MIPI_DSI >> +depends on BACKLIGHT_CLASS_DEVICE >> +help >> + Say Y here if you want to enable support for the Mantix >> + MLAF057WE51-X MIPI DSI panel as e.g. used in the Librem 5. It >> + has a resolution of 720x1440 pixels, a built in backlight and touch >> + controller. >> + >> config DRM_PANEL_NEC_NL8048HL11 >> tristate "NEC NL8048HL11 RGB panel" >> depends on GPIOLIB && OF && SPI >> @@ -438,17 +415,6 @@ config DRM_PANEL_NOVATEK_NT39016 >>Say Y here if you want to enable support for the panels built >>around the Novatek NT39016 display controller. >> >> -config DRM_PANEL_MANTIX_MLAF057WE51 >> -tristate "Mantix MLAF057WE51-X MIPI-DSI LCD panel" >> -depends on OF >> -depends on DRM_MIPI_DSI >> -depends on BACKLIGHT_CLASS_DEVICE >> -help >> - Say Y here if you want to enable support for the Mantix >> - MLAF057WE51-X MIPI DSI panel as e.g. used in the Librem 5. It >> - has a resolution of 720x1440 pixels, a built in backlight and touch >> - controller. >> - >> config DRM_PANEL_OLIMEX_LCD_OLINUXINO >> tristate "Olimex LCD-OLinuXi
[PATCH] drm/panel: re-alphabetize the menu list
A few of the DRM_PANEL entries have become out of alphabetical order, so move them around a bit to restore alpha order. Signed-off-by: Randy Dunlap Cc: Neil Armstrong Cc: Jessica Zhang Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/panel/Kconfig | 90 1 file changed, 45 insertions(+), 45 deletions(-) diff -- a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -95,34 +95,6 @@ config DRM_PANEL_LVDS handling of power supplies or control signals. It implements automatic backlight handling if the panel is attached to a backlight controller. -config DRM_PANEL_SIMPLE - tristate "support for simple panels (other than eDP ones)" - depends on OF - depends on BACKLIGHT_CLASS_DEVICE - depends on PM - select VIDEOMODE_HELPERS - help - DRM panel driver for dumb non-eDP panels that need at most a regulator - and a GPIO to be powered up. Optionally a backlight can be attached so - that it can be automatically turned off when the panel goes into a - low power state. - -config DRM_PANEL_EDP - tristate "support for simple Embedded DisplayPort panels" - depends on OF - depends on BACKLIGHT_CLASS_DEVICE - depends on PM - select VIDEOMODE_HELPERS - select DRM_DISPLAY_DP_HELPER - select DRM_DISPLAY_HELPER - select DRM_DP_AUX_BUS - select DRM_KMS_HELPER - help - DRM panel driver for dumb eDP panels that need at most a regulator and - a GPIO to be powered up. Optionally a backlight can be attached so - that it can be automatically turned off when the panel goes into a - low power state. - config DRM_PANEL_EBBG_FT8719 tristate "EBBG FT8719 panel driver" depends on OF @@ -317,12 +289,6 @@ config DRM_PANEL_LEADTEK_LTK500HD1829 24 bit RGB per pixel. It provides a MIPI DSI interface to the host and has a built-in LED backlight. -config DRM_PANEL_SAMSUNG_LD9040 - tristate "Samsung LD9040 RGB/SPI panel" - depends on OF && SPI - depends on BACKLIGHT_CLASS_DEVICE - select VIDEOMODE_HELPERS - config DRM_PANEL_LG_LB035Q02 tristate "LG LB035Q024573 RGB panel" depends on GPIOLIB && OF && SPI @@ -350,6 +316,17 @@ config DRM_PANEL_MAGNACHIP_D53E6EA8966 with the Magnachip D53E6EA8966 panel IC. This panel receives video data via DSI but commands via 9-bit SPI using DBI. +config DRM_PANEL_MANTIX_MLAF057WE51 + tristate "Mantix MLAF057WE51-X MIPI-DSI LCD panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Mantix + MLAF057WE51-X MIPI DSI panel as e.g. used in the Librem 5. It + has a resolution of 720x1440 pixels, a built in backlight and touch + controller. + config DRM_PANEL_NEC_NL8048HL11 tristate "NEC NL8048HL11 RGB panel" depends on GPIOLIB && OF && SPI @@ -438,17 +415,6 @@ config DRM_PANEL_NOVATEK_NT39016 Say Y here if you want to enable support for the panels built around the Novatek NT39016 display controller. -config DRM_PANEL_MANTIX_MLAF057WE51 - tristate "Mantix MLAF057WE51-X MIPI-DSI LCD panel" - depends on OF - depends on DRM_MIPI_DSI - depends on BACKLIGHT_CLASS_DEVICE - help - Say Y here if you want to enable support for the Mantix - MLAF057WE51-X MIPI DSI panel as e.g. used in the Librem 5. It - has a resolution of 720x1440 pixels, a built in backlight and touch - controller. - config DRM_PANEL_OLIMEX_LCD_OLINUXINO tristate "Olimex LCD-OLinuXino panel" depends on OF @@ -566,6 +532,12 @@ config DRM_PANEL_SAMSUNG_DB7430 DB7430 DPI display controller used in such devices as the LMS397KF04 480x800 DPI panel. +config DRM_PANEL_SAMSUNG_LD9040 + tristate "Samsung LD9040 RGB/SPI panel" + depends on OF && SPI + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + config DRM_PANEL_SAMSUNG_S6D16D0 tristate "Samsung S6D16D0 DSI video mode panel" depends on OF @@ -774,6 +746,34 @@ config DRM_PANEL_STARTEK_KD070FHFID015 with a resolution of 1024 x 600 pixels. It provides a MIPI DSI interface to the host, a built-in LED backlight and touch controller. +config DRM_PANEL_EDP + tristate "support for simple Embedded DisplayPort panels" + depends on OF + depends on BACKLIGHT_
[PATCH v2] backlight: ili922x: drop kernel-doc for local macros
Don't use kernel-doc notation for the local macros START_BYTE() and CHECK_FREQ_REG(). This prevents these kernel-doc warnings: ili922x.c:85: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * START_BYTE(id, rs, rw) ili922x.c:85: warning: missing initial short description on line: * START_BYTE(id, rs, rw) ili922x.c:118: warning: expecting prototype for CHECK_FREQ_REG(spi_device s, spi_transfer x)(). Prototype was for CHECK_FREQ_REG() instead Signed-off-by: Randy Dunlap Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: Helge Deller Cc: linux-fb...@vger.kernel.org --- v2: just drop the kernel-docness completely for these macros (Lee) drivers/video/backlight/ili922x.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/drivers/video/backlight/ili922x.c b/drivers/video/backlight/ili922x.c --- a/drivers/video/backlight/ili922x.c +++ b/drivers/video/backlight/ili922x.c @@ -81,7 +81,7 @@ #define START_RW_WRITE 0 #define START_RW_READ 1 -/** +/* * START_BYTE(id, rs, rw) * * Set the start byte according to the required operation. @@ -100,7 +100,7 @@ #define START_BYTE(id, rs, rw) \ (0x70 | (((id) & 0x01) << 2) | (((rs) & 0x01) << 1) | ((rw) & 0x01)) -/** +/* * CHECK_FREQ_REG(spi_device s, spi_transfer x) - Check the frequency * for the SPI transfer. According to the datasheet, the controller * accept higher frequency for the GRAM transfer, but it requires
Re: [PATCH] backlight: ili922x: fix W=1 kernel-doc warnings
On 12/6/23 05:25, Lee Jones wrote: > On Wed, 06 Dec 2023, Daniel Thompson wrote: > >> On Tue, Dec 05, 2023 at 02:56:38PM -0800, Randy Dunlap wrote: >>> Fix kernel-doc warnings found when using "W=1". >>> >>> ili922x.c:85: warning: This comment starts with '/**', but isn't a >>> kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst >>> ili922x.c:85: warning: missing initial short description on line: >>> * START_BYTE(id, rs, rw) >>> ili922x.c:91: warning: contents before sections >>> ili922x.c:118: warning: expecting prototype for CHECK_FREQ_REG(spi_device >>> s, spi_transfer x)(). Prototype was for CHECK_FREQ_REG() instead >>> >>> Signed-off-by: Randy Dunlap >>> Cc: Lee Jones >>> Cc: Daniel Thompson >>> Cc: Jingoo Han >>> Cc: Helge Deller >>> Cc: linux-fb...@vger.kernel.org >>> --- >>> drivers/video/backlight/ili922x.c |9 - >>> 1 file changed, 4 insertions(+), 5 deletions(-) >>> >>> diff -- a/drivers/video/backlight/ili922x.c >>> b/drivers/video/backlight/ili922x.c >>> --- a/drivers/video/backlight/ili922x.c >>> +++ b/drivers/video/backlight/ili922x.c >>> @@ -82,13 +82,12 @@ >>> #define START_RW_READ 1 >>> >>> /** >>> - * START_BYTE(id, rs, rw) >>> - * >>> - * Set the start byte according to the required operation. >>> + * START_BYTE() - Set the start byte according to the required operation. >>> * The start byte is defined as: >>> * -- >>> * | 0 | 1 | 1 | 1 | 0 | ID | RS | RW | >>> * -- >> >> I'm not sure we want "The start byte is defined as" in the brief >> description. Needs a blank line between the brief and full description >> (or hoist the argument descriptions up to match the idiomatic >> form for a kernel-doc comment in the docs if you prefer). > > I'd consider dropping the kernel-docness of this header entirely. > Kerneldoc is designed for documenting exported (or at least externally > available) functions and data structures, with allowances for static > functions in the name of consistency or in cases of excessive > complication. I've fixed A LOT of kernel-doc headers in my time and I > can't say I remember coming across MACROs being documented this way > before now. > I've seen several macros that are documented, but I am happy to just drop the kernel-doc for these local macros. I'll send a patch for that. Thanks. -- ~Randy
[PATCH] fbdev: hgafb: fix kernel-doc comments
Fix kernel-doc warnings found when using "W=1". hgafb.c:370: warning: No description found for return value of 'hgafb_open' hgafb.c:384: warning: No description found for return value of 'hgafb_release' hgafb.c:406: warning: No description found for return value of 'hgafb_setcolreg' hgafb.c:425: warning: No description found for return value of 'hgafb_pan_display' hgafb.c:425: warning: expecting prototype for hga_pan_display(). Prototype was for hgafb_pan_display() instead hgafb.c:455: warning: No description found for return value of 'hgafb_blank' Signed-off-by: Randy Dunlap Cc: Ferenc Bakonyi Cc: Helge Deller Cc: linux-nvi...@lists.surfsouth.com Cc: linux-fb...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org --- drivers/video/fbdev/hgafb.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff -- a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c --- a/drivers/video/fbdev/hgafb.c +++ b/drivers/video/fbdev/hgafb.c @@ -364,6 +364,8 @@ error: * hgafb_open - open the framebuffer device * @info: pointer to fb_info object containing info for current hga board * @init: open by console system or userland. + * + * Returns: %0 */ static int hgafb_open(struct fb_info *info, int init) @@ -378,6 +380,8 @@ static int hgafb_open(struct fb_info *in * hgafb_release - open the framebuffer device * @info: pointer to fb_info object containing info for current hga board * @init: open by console system or userland. + * + * Returns: %0 */ static int hgafb_release(struct fb_info *info, int init) @@ -399,6 +403,8 @@ static int hgafb_release(struct fb_info * This callback function is used to set the color registers of a HGA * board. Since we have only two fixed colors only @regno is checked. * A zero is returned on success and 1 for failure. + * + * Returns: %0 */ static int hgafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, @@ -410,14 +416,15 @@ static int hgafb_setcolreg(u_int regno, } /** - * hga_pan_display - pan or wrap the display + * hgafb_pan_display - pan or wrap the display * @var:contains new xoffset, yoffset and vmode values * @info:pointer to fb_info object containing info for current hga board * * This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP * flag in @var. If input parameters are correct it calls hga_pan() to * program the hardware. @info->var is updated to the new values. - * A zero is returned on success and %-EINVAL for failure. + * + * Returns: %0 on success or %-EINVAL for failure. */ static int hgafb_pan_display(struct fb_var_screeninfo *var, @@ -449,6 +456,8 @@ static int hgafb_pan_display(struct fb_v * @blank_mode == 2 means suspend vsync, * @blank_mode == 3 means suspend hsync, * @blank_mode == 4 means powerdown. + * + * Returns: %0 */ static int hgafb_blank(int blank_mode, struct fb_info *info)
[PATCH] backlight: ili922x: fix W=1 kernel-doc warnings
Fix kernel-doc warnings found when using "W=1". ili922x.c:85: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ili922x.c:85: warning: missing initial short description on line: * START_BYTE(id, rs, rw) ili922x.c:91: warning: contents before sections ili922x.c:118: warning: expecting prototype for CHECK_FREQ_REG(spi_device s, spi_transfer x)(). Prototype was for CHECK_FREQ_REG() instead Signed-off-by: Randy Dunlap Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: Helge Deller Cc: linux-fb...@vger.kernel.org --- drivers/video/backlight/ili922x.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff -- a/drivers/video/backlight/ili922x.c b/drivers/video/backlight/ili922x.c --- a/drivers/video/backlight/ili922x.c +++ b/drivers/video/backlight/ili922x.c @@ -82,13 +82,12 @@ #define START_RW_READ 1 /** - * START_BYTE(id, rs, rw) - * - * Set the start byte according to the required operation. + * START_BYTE() - Set the start byte according to the required operation. * The start byte is defined as: * -- * | 0 | 1 | 1 | 1 | 0 | ID | RS | RW | * -- + * * @id: display's id as set by the manufacturer * @rs: operation type bit, one of: * - START_RS_INDEX set the index register @@ -101,14 +100,14 @@ (0x70 | (((id) & 0x01) << 2) | (((rs) & 0x01) << 1) | ((rw) & 0x01)) /** - * CHECK_FREQ_REG(spi_device s, spi_transfer x) - Check the frequency + * CHECK_FREQ_REG() - Check the frequency * for the SPI transfer. According to the datasheet, the controller * accept higher frequency for the GRAM transfer, but it requires * lower frequency when the registers are read/written. * The macro sets the frequency in the spi_transfer structure if * the frequency exceeds the maximum value. * @s: pointer to an SPI device - * @x: pointer to the read/write buffer pair + * @x: pointer to the _transfer read/write buffer pair */ #define CHECK_FREQ_REG(s, x) \ do {\
Re: [PATCH] video: fbdev: mmp: Fix typo in code comment
Hi, On 11/24/23 01:52, Dario Binacchi wrote: > s/singals/signals/ > > Fixes: 641b4b1b6a7c ("video: mmpdisp: add spi port in display controller") > Signed-off-by: Dario Binacchi > --- > > drivers/video/fbdev/mmp/hw/mmp_spi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/video/fbdev/mmp/hw/mmp_spi.c > b/drivers/video/fbdev/mmp/hw/mmp_spi.c > index 16401eb95c6c..64e34b7e739e 100644 > --- a/drivers/video/fbdev/mmp/hw/mmp_spi.c > +++ b/drivers/video/fbdev/mmp/hw/mmp_spi.c > @@ -91,7 +91,7 @@ static int lcd_spi_setup(struct spi_device *spi) > writel(tmp, reg_base + LCD_SPU_SPI_CTRL); > > /* > - * After set mode it need a time to pull up the spi singals, > + * After set mode it need a time to pull up the spi signals, Also: it needs time or it needs some time >* or it would cause the wrong waveform when send spi command, >* especially on pxa910h >*/ thanks. -- ~Randy
Re: [PATCH] drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h
On 11/22/23 14:18, Arnd Bergmann wrote: > From: Arnd Bergmann > > Without this header, the newly added code fails to build: > > drivers/gpu/drm/rockchip/rk3066_hdmi.c: In function > 'rk3066_hdmi_encoder_enable': > drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:22: error: implicit declaration of > function 'drm_atomic_get_new_connector_state'; did you mean > 'drm_atomic_helper_connector_reset'? [-Werror=implicit-function-declaration] > 397 | conn_state = drm_atomic_get_new_connector_state(state, > >connector); > | ^~ > | drm_atomic_helper_connector_reset > drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:20: error: assignment to 'struct > drm_connector_state *' from 'int' makes pointer from integer without a cast > [-Werror=int-conversion] > 397 | conn_state = drm_atomic_get_new_connector_state(state, > >connector); > |^ > drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:22: error: implicit declaration of > function 'drm_atomic_get_new_crtc_state'; did you mean > 'drm_atomic_helper_swap_state'? [-Werror=implicit-function-declaration] > 401 | crtc_state = drm_atomic_get_new_crtc_state(state, > conn_state->crtc); > | ^ > | drm_atomic_helper_swap_state > drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:20: error: assignment to 'struct > drm_crtc_state *' from 'int' makes pointer from integer without a cast > [-Werror=int-conversion] > 401 | crtc_state = drm_atomic_get_new_crtc_state(state, > conn_state->crtc); > |^ > > Fixes: ae3436a5e7c2 ("drm/rockchip: rk3066_hdmi: Switch encoder hooks to > atomic") > Signed-off-by: Arnd Bergmann Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Thanks. > --- > drivers/gpu/drm/rockchip/rk3066_hdmi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/rockchip/rk3066_hdmi.c > b/drivers/gpu/drm/rockchip/rk3066_hdmi.c > index 0e7aae341960..7d561c5a650f 100644 > --- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c > +++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c > @@ -4,6 +4,7 @@ > *Zheng Yang > */ > > +#include > #include > #include > #include -- ~Randy
Re: [PATCH] drm/amd: Document device reset methods
Hi-- On 11/10/23 07:55, André Almeida wrote: > Document what each amdgpu driver reset method does. > > Signed-off-by: André Almeida > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 20 > 1 file changed, 20 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > index a79d53bdbe13..500f86c79eb7 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > @@ -504,6 +504,26 @@ struct amdgpu_allowed_register_entry { > bool grbm_indexed; > }; > > +/** > + * enum amd_reset_method - Methods for resetting AMD GPU devices > + * > + * @AMD_RESET_METHOD_NONE: The device will not be reset. > + * @AMD_RESET_LEGACY: Method reserved for SI/CIK asics. ASICs. > + * @AMD_RESET_MODE0: High level PCIe reset. > + * @AMD_RESET_MODE1: Resets each IP block (SDMA, GFX, VCN, etc.) > individually. > + * Suitable only for some discrete GPUs. > + * @AMD_RESET_MODE2: Resets only the GFX block. Useful for APUs, giving that > + * the rest of IP blocks and SMU is shared with the CPU. > + * @AMD_RESET_BACO: BACO (Bus Alive, Chip Off) method powers off and on the > card > + * but without powering off the PCI bus. Suitable only for > + * discrete GPUs. > + * @AMD_RESET_PCI: Does a full bus reset, including powering on and off the > + * card. > + * > + * Methods available for AMD GPU driver for resetting the device. Not all > + * methods are suitable for every device. User can overwrite the method using s/overwrite/override/ would make more sense to me. Otherwise looks good. Thanks. > + * module parameter `reset_method`. > + */ > enum amd_reset_method { > AMD_RESET_METHOD_NONE = -1, > AMD_RESET_METHOD_LEGACY = 0, -- ~Randy