aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2024-05-31media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()Zheng Yejian1-4/+31
Infinite log printing occurs during fuzz test: rc rc1: DViCO FusionHDTV DVB-T USB (LGZ201) as ... ... dvb-usb: schedule remote query interval to 100 msecs. dvb-usb: DViCO FusionHDTV DVB-T USB (LGZ201) successfully initialized ... dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) ... dvb-usb: bulk message failed: -22 (1/0) Looking into the codes, there is a loop in dvb_usb_read_remote_control(), that is in rc_core_dvb_usb_remote_init() create a work that will call dvb_usb_read_remote_control(), and this work will reschedule itself at 'rc_interval' intervals to recursively call dvb_usb_read_remote_control(), see following code snippet: rc_core_dvb_usb_remote_init() { ... INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); ... } dvb_usb_read_remote_control() { ... err = d->props.rc.core.rc_query(d); if (err) err(...) // Did not return even if query failed schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); } When the infinite log printing occurs, the query callback 'd->props.rc.core.rc_query' is cxusb_rc_query(). And the log is due to the failure of finding a valid 'generic_bulk_ctrl_endpoint' in usb_bulk_msg(), see following code snippet: cxusb_rc_query() { cxusb_ctrl_msg() { dvb_usb_generic_rw() { ret = usb_bulk_msg(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint),...); if (ret) err("bulk message failed: %d (%d/%d)",ret,wlen,actlen); ... } ... } By analyzing the corresponding USB descriptor, it shows that the bNumEndpoints is 0 in its interface descriptor, but the 'generic_bulk_ctrl_endpoint' is 1, that means user don't configure a valid endpoint for 'generic_bulk_ctrl_endpoint', therefore this 'invalid' USB device should be rejected before it calls into dvb_usb_read_remote_control(). To fix it, we need to add endpoint check for 'generic_bulk_ctrl_endpoint'. And as Sean suggested, the same check and clear halts should be done for 'generic_bulk_ctrl_endpoint_response'. So introduce dvb_usb_check_bulk_endpoint() to do it for both of them. Fixes: 4d43e13f723e ("V4L/DVB (4643): Multi-input patch for DVB-USB device") Signed-off-by: Zheng Yejian <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: mceusb: No need for vendor/product ID in nameSean Young1-9/+2
This is available in other places and doesn't belong in the name of the rc device. Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31power: supply: power-supply-leds: Add charging_orange_full_green trigger for ↵Kate Hsuan1-0/+23
RGB LED Add a charging_orange_full_green LED trigger and the trigger is based on led_mc_trigger_event() which can set an RGB LED when the trigger is triggered. The LED will show orange when the battery status is charging. The LED will show green when the battery status is full. Link: https://lore.kernel.org/linux-leds/[email protected]/ Signed-off-by: Kate Hsuan <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> [[email protected] change color order to RGB] Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
2024-05-31leds: trigger: Add led_mc_trigger_event() functionHans de Goede1-0/+20
Add a new led_mc_trigger_event() function for triggers which want to change the color of a multi-color LED based on their trigger conditions. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Jacek Anaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
2024-05-31leds: core: Add led_mc_set_brightness() functionHans de Goede2-0/+32
Add a new led_mc_set_brightness() function for in kernel color/brightness changing of multi-color LEDs. led-class-multicolor can be build as a module and led_mc_set_brightness() will have the builtin callers, so put led_mc_set_brightness() inside led-core instead, just like how led_set_brightness() is part of the core and not of the led-class object. This also adds a new LED_MULTI_COLOR led_classdev flag to allow led_mc_set_brightness() to verify that it is operating on a multi-color LED classdev, avoiding casting the passed in LED classdev to a multi-color LED classdev, when it actually is not a multi-color LED. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Jacek Anaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
2024-05-31leds: rgb: leds-ktd202x: Initialize mutex earlierHans de Goede1-4/+4
The mutex must be initialized before the LED class device is registered otherwise there is a race where it may get used before it is initialized: DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 2 PID: 2045 at kernel/locking/mutex.c:587 __mutex_lock ... RIP: 0010:__mutex_lock+0x7db/0xc10 ... set_brightness_delayed_set_brightness.part.0+0x17/0x60 set_brightness_delayed+0xf1/0x100 process_one_work+0x222/0x5a0 Move the mutex_init() call earlier to avoid this race condition and switch to devm_mutex_init() to avoid the need to add error-exit cleanup to probe() if probe() fails later on. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
2024-05-31leds: rgb: leds-ktd202x: I2C ID tables for KTD2026 and 2027Kate Hsuan1-0/+8
Add an i2c_device_id id_table to match manually instantiated (non device-tree / ACPI instantiated) KTD202x controllers as found on some x86 boards. This table shows the maximum support LED channel for KTD2026 (three LEDs) and KTD-2027 (4 LEDs). Link: https://www.kinet-ic.com/uploads/KTD2026-7-04h.pdf Signed-off-by: Kate Hsuan <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
2024-05-31leds: rgb: leds-ktd202x: Get device properties through fwnode to support ACPIKate Hsuan2-31/+34
This LED controller is installed on a Xiaomi pad2 and it is an x86 platform. The original driver is based on the device tree and can't be used for this ACPI based system. This patch migrated the driver to use fwnode to access the properties. Moreover, the fwnode API supports the device tree so this work won't affect the original implementations. Signed-off-by: Kate Hsuan <[email protected]> Tested-by: André Apitzsch <[email protected]> # on BQ Aquaris M5 Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
2024-05-31media: tegra-vde: remove unused struct 'tegra_vde_h264_frame'Dr. David Alan Gilbert2-6/+0
'tegra_vde_h264_frame' has been unused since commit 313db7d235a0 ("media: staging: tegra-vde: Remove legacy UAPI support"). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: m2m-deinterlace: remove unused struct 'vb2_dc_conf'Dr. David Alan Gilbert1-4/+0
'vb2_dc_conf' has been unused since the original commit 8f0755c06b90 ("[media] media: Add mem2mem deinterlacing driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: amphion: remove unused struct 'vpu_malone_frame_buffer'Dr. David Alan Gilbert1-5/+0
'vpu_malone_frame_buffer' has been unused since the original commit 145e936380ed ("media: amphion: implement malone decoder rpc interface"). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: rockchip: rga: fix sequence number handlingMichael Tretter3-0/+12
The RGA driver didn't set the sequence numbers of the returned buffers. Keep track of the CAPTURE and OUTPUT sequence numbers, and set the sequence numbers in the source and destination buffers. Signed-off-by: Michael Tretter <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: pci/ivtv: Use managed version of pci_enable_deviceRicardo Ribalda1-2/+1
If there is any error during probing, we should probably leave the device in its previous state. pcim_ will take care of this. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: pci/ivtv: Replace request_mem_region with devm_ variantRicardo Ribalda1-31/+14
The managed device resource version of the function greatly simplifies the error handling. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: pci/ivtv: Replace ioremap with devm_ variantsRicardo Ribalda1-39/+12
With Managed Device Resources the error handling is simpler. The following smatch warning is silenced: drivers/media/pci/ivtv/ivtv-driver.c: drivers/media/pci/ivtv/ivtv-driver.c:1296 ivtv_probe() warn: 'itv->dec_mem' from ioremap() not released on lines: 1296. drivers/media/pci/ivtv/ivtv-driver.c: drivers/media/pci/ivtv/ivtv-driver.c:1296 ivtv_probe() warn: 'itv->enc_mem' from ioremap() not released on lines: 1296. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: siano: Use flex arrays for sms_firmwareRicardo Ribalda1-1/+1
Replace old style single array member, with flex array. The struct is allocated, but it seems like there was an over allocation error: fw_buf = kmalloc(ALIGN(fw->size + sizeof(struct sms_firmware), SMS_ALLOC_ALIGNMENT), GFP_KERNEL | coredev->gfp_buf_flags); This change fixes this cocci warning: drivers/media/common/siano/smscoreapi.h:669:6-13: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: siano: Remove unused structuresRicardo Ribalda1-14/+0
These structs are not used in the code, remove them. This fixes the following cocci warning: drivers/media/common/siano/smscoreapi.h:1049:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/common/siano/smscoreapi.h:1055:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: siano: Refactor struct sms_msg_dataRicardo Ribalda4-11/+13
Replace a single element array with a single element field. The endianness conversion code seems to support multiple elements. To avoid changing behavior a pointer to the single element has been used. This is safer than moving to a flex array, because in that case the structure size changes. This fixes the following cocci warning: drivers/media/common/siano/smscoreapi.h:619:5-13: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: pci: cx18: Use flex arrays for struct cx18_scbRicardo Ribalda1-1/+1
Replace the old-style single element array with a flexible array. This structure does not seem to be allocated in the code, so there is no need to change anything else. The following cocci warning is fixed: drivers/media/pci/cx18/cx18-scb.h:261:22-29: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: xilinx: Refactor struct xvip_dmaRicardo Ribalda2-3/+3
Replace a single element array with a single field. The following cocci warning is fixed: drivers/media/platform/xilinx/xilinx-dma.h:100:19-22: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: allegro: nal-hevc: Replace array[1] with array[N]Ricardo Ribalda1-3/+4
Structures that have a single element array as the last field can be mistaken as a "flex array". We could replace all the single element arrays in the structure with single element fields, but this driver prefers to follow the ITU-T H.265 specification, which defines it as an array. If we introduce a new define N_HRD_PARAMS, we make clear our intentions. This fixes this cocci warning: drivers/media/platform/allegro-dvt/nal-hevc.h:102:14-22: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda <[email protected]> Reviewed-by: Michael Tretter <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: fix typo in subject and commit log]
2024-05-31media: pvrusb2: remove unused struct 'debugifc_mask_item'Dr. David Alan Gilbert1-5/+0
'debugifc_mask_item' is unused since commit 681c73994401 ("V4L/DVB (6691): pvrusb2: Rework pipeline state control"). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: opera1: remove unused struct 'rc_map_opera_table'Dr. David Alan Gilbert1-4/+0
'rc_map_opera_table' has been unused since commit 2f4f58d689dd ("[media] rc: Name RC keymap tables as rc_map_table"). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: gs1662: remove unused struct 'gs_reg_fmt_custom'Dr. David Alan Gilbert1-8/+0
'gs_reg_fmt_custom' is unused since the original commit 7aae6e2df127 ("[media] Add GS1662 driver, a video serializer"). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: dvb-frontends: dib7000p: remove unused struct 'i2c_device'Dr. David Alan Gilbert1-5/+0
'i2c_device' was added by the original commit 713d54a8bd81 ("[media] DiB7090: add support for the dib7090 based") but is unused. Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: dvb-frontends: stv0910: remove unused struct 'sinit_table'Dr. David Alan Gilbert1-5/+0
'sinit_table' has been unused since the original commit cd21b3349437 ("media: dvb-frontends: add ST STV0910 DVB-S/S2 demodulator frontend driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: dvb-frontends: drx39xyj: remove unused struct 'drxjeq_stat'Dr. David Alan Gilbert1-7/+0
'drxjeq_stat' is unused since the original commit 38b2df95c53b ("[media] drx-j: add a driver for Trident drx-j frontend"). The name was changed by commit 57afe2f0bb0c ("[media] drx-j: Don't use CamelCase") and it was originally DRXJEQStat_t. Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: go7007: Refactor Adlink PCI-MPG24 i2c mutexRicardo Ribalda1-11/+19
Move the lock/unlock to its own function. It makes the code cleaner and cocci happier. Fix the following cocci warning: drivers/media/usb/go7007/go7007-i2c.c:125:1-7: preceding lock on line 61 Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: dvb-frontends/stv090x: Refactor tuner_i2c_lockRicardo Ribalda1-16/+21
Move the lock logic to it's own function. There is less code duplication and cocci is much happier. Fix the following cocci warning: drivers/media/dvb-frontends/stv090x.c:799:1-7: preceding lock on line 768 Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: ivtv: Factor out schedule functionsRicardo Ribalda1-27/+39
Cocci is very confused by unlock-lock a mutex in the middle of a function. Factor the schedules out, avoid code duplication and make cocci a bit happier. Fix the following cocci warnings: drivers/media/pci/ivtv/ivtv-fileops.c:223:4-10: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:230:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:236:4-10: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:245:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:251:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:257:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:272:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:598:4-10: preceding lock on line 627 drivers/media/pci/ivtv/ivtv-fileops.c:598:4-10: preceding lock on line 689 drivers/media/pci/ivtv/ivtv-fileops.c:606:3-9: preceding lock on line 627 drivers/media/pci/ivtv/ivtv-fileops.c:606:3-9: preceding lock on line 689 drivers/media/pci/ivtv/ivtv-fileops.c:648:3-9: preceding lock on line 627 drivers/media/pci/ivtv/ivtv-fileops.c:648:3-9: preceding lock on line 689 drivers/media/pci/ivtv/ivtv-fileops.c:692:4-10: preceding lock on line 689 Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31media: pci: ivtv: Add check for DMA map resultMikhail Kobuk3-3/+17
In case DMA fails, 'dma->SG_length' is 0. This value is later used to access 'dma->SGarray[dma->SG_length - 1]', which will cause out of bounds access. Add check to return early on invalid value. Adjust warnings accordingly. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1932dc2f4cf6 ("media: pci/ivtv: switch from 'pci_' to 'dma_' API") Signed-off-by: Mikhail Kobuk <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-05-31drm/komeda: remove unused struct 'gamma_curve_segment'Dr. David Alan Gilbert1-5/+0
'gamma_curve_segment' looks like it has never been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Acked-by: Liviu Dudau <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Liviu Dudau <[email protected]>
2024-05-31drm/i915: Switch intel_usecs_to_scanlines() to 64bit mathsVille Syrjälä1-2/+2
Dotclocks can reach ~1GHz these days, so intel_usecs_to_scanlines(), with its 32bit maths, is currently limited to a few milliseconds. I want bigger numbers in DSB selftests, so switch over to 64bit maths. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31drm/i915: Move intel_crtc_scanline_offset()Ville Syrjälä1-38/+38
I want to use intel_crtc_scanline_offset() in intel_crtc_scanline_to_hw(). Relocate intel_crtc_scanline_offset() a bit to avoid a forward declaration. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31drm/i915: Simplify scanline_offset handling for gen2Ville Syrjälä1-5/+3
Currently intel_crtc_scanline_offset() is careful to always return a positive offset. That is not actually necessary as long as we take care of negative values when applying the offset in __intel_get_crtc_scanline(). This simplifies intel_crtc_scanline_offset(), and makes the scanline_offfset arithmetic more symmetric between the forward (__intel_get_crtc_scanline()) and reverse (intel_crtc_scanline_to_hw()) directions. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31drm/i915: Extract intel_mode_vtotal()Ville Syrjälä2-23/+18
We have several copies of code calculating the hardware's idea of vtotal. Pull that to a helper, similar to intel_mode_vblank_{start,end}(). Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31drm/i915: Extract intel_mode_vblank_end()Ville Syrjälä2-4/+13
Extract intel_mode_vblank_end() in the same vein as intel_mode_vblank_start(). While we have only one use of this it seems nicer to unify the approach. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31drm/i915: Reuse intel_mode_vblank_start()Ville Syrjälä3-13/+9
Replace a few hand rolled copies of intel_mode_vblank_start() with the real thing. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31drm/i915: Plumb the full atomic state into skl_ddb_add_affected_planes()Ville Syrjälä1-10/+9
skl_ddb_add_affected_planes() needs the full atomic state. Instead of digging that out from dubious sources plumb it in explicitly. The wm counterpart (skl_wm_add_affected_planes()) already does things in the proper way. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31drm/i915: Plumb the full atomic state into icl_check_nv12_planes()Ville Syrjälä1-5/+6
icl_check_nv12_planes() needs the full atomic state. Instead of digging that out from dubious sources plumb it in explicitly. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31drm/i915/cdclk: Plumb the full atomic state deeperVille Syrjälä1-25/+35
Various parts of the cdclk code need access the full atomic state. Currently it's being dug out via the cdclk_state->base.state pointer, which is not great as that pointer isn't always valid. Instead plumb the full atomic state from the top so that it's clear that it is in fact valid. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
2024-05-31thunderbolt: debugfs: Fix margin debugfs node creation conditionAapo Vienamo1-2/+3
The margin debugfs node controls the "Enable Margin Test" field of the lane margining operations. This field selects between either low or high voltage margin values for voltage margin test or left or right timing margin values for timing margin test. According to the USB4 specification, whether or not the "Enable Margin Test" control applies, depends on the values of the "Independent High/Low Voltage Margin" or "Independent Left/Right Timing Margin" capability fields for voltage and timing margin tests respectively. The pre-existing condition enabled the debugfs node also in the case where both low/high or left/right margins are returned, which is incorrect. This change only enables the debugfs node in question, if the specific required capability values are met. Signed-off-by: Aapo Vienamo <[email protected]> Fixes: d0f1e0c2a699 ("thunderbolt: Add support for receiver lane margining") Cc: [email protected] Signed-off-by: Mika Westerberg <[email protected]>
2024-05-31crypto: atmel-sha204a - fix negated return valueLothar Rubusch1-1/+1
Fix negated variable return value. Fixes: e05ce444e9e5 ("crypto: atmel-sha204a - add reading from otp zone") Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/linux-crypto/[email protected]/ Signed-off-by: Lothar Rubusch <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2024-05-31crypto: tegra - Remove an incorrect iommu_fwspec_free() call in ↵Christophe JAILLET1-1/+0
tegra_se_remove() The only iommu function call in this driver is a tegra_dev_iommu_get_stream_id() which does not allocate anything and does not take any reference. So there is no point in calling iommu_fwspec_free() in the remove function. Remove this incorrect function call. Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver") Signed-off-by: Christophe JAILLET <[email protected]> Tested-by: Akhil R <[email protected]> Acked-by: Akhil R <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2024-05-31crypto: qat - Fix typoDeming Wang1-1/+1
The mapings should be replaced by mappings. Signed-off-by: Deming Wang <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2024-05-31crypto: n2 - Remove unused struct 'n2_skcipher_request_context'Dr. David Alan Gilbert1-4/+0
'n2_skcipher_request_context' was added in commit 23a6564a6b51 ("crypto: niagara2 - switch to skcipher API") but never used. Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2024-05-31crypto: hifn_795x - Remove unused hifn_*_command structsDr. David Alan Gilbert1-17/+0
Remove 'hifn_mac_command' and 'hifn_comp_command' which are unused. They're the same structure as 'hifn_crypt_command' which is used. (I was tempted to remove hifn_base_result hifn_comp_result hifn_mac_result and hifn_crypt_result which are also unused, but they vary, and perhaps they're telling someone in the future what to look at.) Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2024-05-31crypto: ccree - Remove unused struct 'tdes_keys'Dr. David Alan Gilbert1-6/+0
'tdes_keys' appears unused. Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Acked-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2024-05-31crypto: axis - Remove unused struct 'dbgfs_u32'Dr. David Alan Gilbert1-7/+0
'dbgfs_u32' appears unused. Remove it. (pdma_stat_descr is also unused, but I'm assuming it's some useful layout description of firmware/hardware so best left in) Signed-off-by: Dr. David Alan Gilbert <[email protected]> Acked-by: Jesper Nilsson <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2024-05-31dma-buf: add a warning when drv try to reserve 0 fence slotsChristian König1-0/+7
When dma_resv_reserve_fences() is called with num_fences=0 it usually means that a driver or other component messed up its calculation how many fences are needed. Warn in that situation. When no fence are needed the function shouldn't be called in the first place. Signed-off-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Matthew Auld <[email protected]>