Bug 202459 - Black screen while resuming a SDXC (UHS) card (_mmc_sd_resume)
Summary: Black screen while resuming a SDXC (UHS) card (_mmc_sd_resume)
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: MMC/SD (show other bugs)
Hardware: Intel Linux
: P1 blocking
Assignee: drivers_mmc-sd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-30 10:38 UTC by Pedro Rodrigues
Modified: 2020-03-07 12:26 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.18
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Pedro Rodrigues 2019-01-30 10:38:23 UTC
This bug can be found on a Lenovo Miix 320-10ICR

When using a SDXC (UHS) card, the screen becomes black if _mmc_sd_resume() is called. After some investigation, I found that an UHS card uses 1.8 V for signalling while a normal SD card uses 3.3 V. By forcing the SDXC to use 3.3 V the black screen does not appear. It seems that during a _mmc_sd_resume function call, while claiming the host, an I2C resume function is called based on an existing supplier link between the I2C bus and the card device.  The problem is that if the signalling voltage is configured to 1.8 V, during the I2C resume call, the screen turns black. 
I was able to fix this issue by setting the initial signal voltage (3.3 V) before suspending the card, so that when the card is resumed, the voltage is in the original state. To do this I added a function call to mmc_set_initial_signal_voltage() during mmc_power_off routine (drivers/mmc/core/core.c). 
As I’m not an expert on Linux,  I’m posting the issue and possible solution so that it could be implemented on a future release.

Please, share your thoughts :)
Comment 1 Tim Schumacher 2019-09-05 19:21:17 UTC
I can't provide further insight but I'm interested if this is possibly the cause for the general issues people are having with the SD card reader on Lenovo Miix 320 devices.

Those issues described in posts like

https://vincent-ventures.com/2018/12/arch-linux-on-lenovo-ideapad-miix-320/
https://esc.sh/blog/linux-on-lenovo-miix-320/

are (1) black screen when booting with an SD card installed and (2) when inserting an SD card after booting it shows up but upon trying to access it the screen turns black until the card is removed again.

I can confirm (1) on my Lenovo Miix 320-10ICR with kernel version 5.2.11. I can also confirm that only SDXC cards are affected, SD and SDHC cards work as expected.
Comment 2 Hans de Goede 2020-03-07 12:26:12 UTC
Thank you for the bug report.

I've just posted a fix for the black screen on Lenovo Miix 320-10ICR  when using USH microSD card issue upstream. See the commit message for technical details about the problem (if you are interested):

https://lore.kernel.org/linux-mmc/20200306143100.164975-1-hdegoede@redhat.com/

Hopefully this fix will get accepted upstream soon.

Note You need to log in before you can comment on or make changes to this bug.