Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues: - [High] Division by zero kernel panic in `__it6505_enable_audio()` when `REG_AUDIO_INPUT_FREQ` reads 0. -- --- Patch [5]: [PATCH v4 5/5] drm/bridge: it6505: Don't reject audio hw_params without an encoder --- commit ce61845cbb90df0a24913039e8ff09c7c4ff53e7 Author: Daniel Golle <[email protected]> drm/bridge: it6505: Don't reject audio hw_params without an encoder This commit drops the encoder check in it6505_audio_setup_hw_params() to ensure stream parameters are always cached, even when no display is attached. It also moves the application of audio parameter defaults to probe time. > diff --git a/drivers/gpu/drm/bridge/ite-it6505.c > b/drivers/gpu/drm/bridge/ite-it6505.c > index 6bb5db565ccac..e01d57b0166a8 100644 > --- a/drivers/gpu/drm/bridge/ite-it6505.c > +++ b/drivers/gpu/drm/bridge/ite-it6505.c > @@ -3004,9 +2994,6 @@ static int it6505_audio_setup_hw_params(struct it6505 > *it6505, > params->sample_rate, params->sample_width, > params->cea.channels); > > - if (!it6505->bridge.encoder) > - return -ENODEV; > - [ ... ] [Severity: High] This is a pre-existing issue, but can this code cause a division by zero kernel panic? Looking at __it6505_enable_audio() in drivers/gpu/drm/bridge/ite-it6505.c, if it6505_read() returns 0 (e.g. if no I2S clock is present or the read fails), regbe is used as a denominator: regbe = it6505_read(it6505, REG_AUDIO_INPUT_FREQ); DRM_DEV_DEBUG_DRIVER(dev, "regbe:0x%02x audio input fs: %d.%d kHz", regbe, 6750 / regbe, (6750 % regbe) * 10 / regbe); When DRM debugging is enabled, this would evaluate the arguments and divide by zero. Should there be a check to ensure regbe is non-zero before it is used in the DRM_DEV_DEBUG_DRIVER macro? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=5
