{"action":"created","issue":{"url":"https://api.github.com/repos/notro/fbtft/issues/178","labels_url":"https://api.github.com/repos/notro/fbtft/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/notro/fbtft/issues/178/comments","events_url":"https://api.github.com/repos/notro/fbtft/issues/178/events","html_url":"https://github.com/notro/fbtft/issues/178","id":48866360,"number":178,"title":"Occasional white screen/kernel panic using fbtft_device/ili9341","user":{"login":"frekky","id":2602861,"avatar_url":"https://avatars.githubusercontent.com/u/2602861?v=3","gravatar_id":"","url":"https://api.github.com/users/frekky","html_url":"https://github.com/frekky","followers_url":"https://api.github.com/users/frekky/followers","following_url":"https://api.github.com/users/frekky/following{/other_user}","gists_url":"https://api.github.com/users/frekky/gists{/gist_id}","starred_url":"https://api.github.com/users/frekky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frekky/subscriptions","organizations_url":"https://api.github.com/users/frekky/orgs","repos_url":"https://api.github.com/users/frekky/repos","events_url":"https://api.github.com/users/frekky/events{/privacy}","received_events_url":"https://api.github.com/users/frekky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-11-15T03:37:58Z","updated_at":"2015-02-01T00:26:47Z","closed_at":"2015-02-01T00:26:47Z","body":"Hi, I am using ili9341 4-wire SPI TFT screen with ads7846 compatible touch panel on a Raspberry Pi B+ with raspbian (3.12.25+ #1 PREEMPT Sat Aug 2 18:11:04 CEST 2014 armv6l GNU/Linux)\r\n\r\nI am using these options in /etc/modules:\r\n```\r\nfbtft_device custom name=fb_ili9341 width=240 height=320 rotate=270 speed=32000000 buswidth=8 bgr=1 gpios=reset:25,led:18,dc:24 cs=0\r\nads7846_device cs=1 speed=2000000 model=7846 swap_xy=1 pressure_max=255 x_min=250 x_max=3780 y_min=160 y_max=3930 x_plate_ohms=60 gpio_pendown=23 keep_vref_on=1\r\n```\r\nThis produces the dmesg output when loaded:\r\n```\r\n[   29.406013] bcm2708_spi bcm2708_spi.0: DMA channel 4 at address 0xf2007400 with irq 20\r\n[   29.430646] bcm2708_spi bcm2708_spi.0: DMA channel 5 at address 0xf2007500 with irq 21\r\n[   29.457397] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80)\r\n[   29.477029] bcm2708_spi bcm2708_spi.0: SPI Controller running in dma mode\r\n[   29.658484] fbtft_device:  SPI devices registered:\r\n[   29.674182] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00\r\n[   29.690712] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00\r\n[   29.698988] fbtft_device:  'fb' Platform devices registered:\r\n[   29.730652] fbtft_device:      bcm2708_fb id=-1 pdata? no\r\n[   29.737956] fbtft_device: Deleting spi0.0\r\n[   29.749371] fbtft_device:  GPIOS used by 'fb_ili9341':\r\n[   29.767063] fbtft_device:    'reset' = GPIO25\r\n[   29.780657] fbtft_device:    'led' = GPIO18\r\n[   29.786618] fbtft_device:    'dc' = GPIO24\r\n[   29.804164] fbtft_device:  SPI devices registered:\r\n[   29.811017] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00\r\n[   29.819062] fbtft_device:      fb_ili9341 spi0.0 32000kHz 8 bits mode=0x00\r\n[   29.974007] ads7846_device: Deleting spi0.1\r\n[   30.577699] graphics fb1: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 16 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz\r\n[   30.650745] ads7846 spi0.1: touchscreen, irq 193\r\n[   30.686757] input: ADS7846 Touchscreen as /devices/platform/bcm2708_spi.0/spi_master/spi0/spi0.1/input/input2\r\n```\r\nThe screen works fine from the point where the modules are loaded, and the boot console is properly mapped to /dev/fb1. When I run ```FRAMEBUFFER=/dev/fb1 startx```, LXDE loads fine, however the screen is quite flickery when I move a mouse.\r\nThe problem occurs when I attempt to use the menu button, which occasionally works fine and brings up a menu which spans across most of the screen (presumably not just the menu button but anything that causes large changes to the screen), at which point the screen may turn completely white. \r\n\r\nOnce the screen is white, I am unable to use it at all until the fbtft_device module is unloaded and reloaded using the same options. Another possibly related issue is that after reloading the driver in such a way more than 2 times, the whole system has a tendency to crash when loading the module.\r\n\r\nAlso running something like ```cat /dev/urandom > /dev/fb1``` briefly makes the screen display random noise, then goes white. I can run the same command on my normal PC, using /dev/fb0 instead, which results in a screen of noise without any problems. \r\n\r\nIf I enable debugging for fbtft_device with level 6, I get the following output when doing ```cat /dev/urandom > /dev/fb1```:\r\n```\r\n[ 1425.339935] graphics fb1: fbtft_fb_write: count=32768, ppos=0\r\n[ 1425.370177] graphics fb1: fbtft_fb_write: count=32768, ppos=32768\r\n[ 1425.382518] fb_ili9341 spi0.0: fbtft_update_display(start_line=0, end_line=238)\r\n[ 1425.403313] graphics fb1: fbtft_fb_write: count=32768, ppos=65536\r\n[ 1425.436840] graphics fb1: fbtft_fb_write: count=32768, ppos=98304\r\n[ 1425.452539] fb_ili9341 spi0.0: fbtft_update_display(start_line=0, end_line=238)\r\n[ 1425.469784] graphics fb1: fbtft_fb_write: count=32768, ppos=131072\r\n[ 1425.482573] graphics fb1: fbtft_fb_imageblit: dx=0, dy=224, width=8, height=16\r\n```\r\nAfter this, driver debug output continues but the screen remains blank. I'm not sure if this is directly a driver issue, due to the long cables (currently ~50cm of cable between Pi and LCD) or something related to incorrect screen size or similar.\r\n\r\nHope this is helpful and that you can diagnose the issue as soon as possible.\r\n"},"comment":{"url":"https://api.github.com/repos/notro/fbtft/issues/comments/72344550","html_url":"https://github.com/notro/fbtft/issues/178#issuecomment-72344550","issue_url":"https://api.github.com/repos/notro/fbtft/issues/178","id":72344550,"user":{"login":"notro","id":530887,"avatar_url":"https://avatars.githubusercontent.com/u/530887?v=3","gravatar_id":"","url":"https://api.github.com/users/notro","html_url":"https://github.com/notro","followers_url":"https://api.github.com/users/notro/followers","following_url":"https://api.github.com/users/notro/following{/other_user}","gists_url":"https://api.github.com/users/notro/gists{/gist_id}","starred_url":"https://api.github.com/users/notro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notro/subscriptions","organizations_url":"https://api.github.com/users/notro/orgs","repos_url":"https://api.github.com/users/notro/repos","events_url":"https://api.github.com/users/notro/events{/privacy}","received_events_url":"https://api.github.com/users/notro/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T00:26:47Z","updated_at":"2015-02-01T00:26:47Z","body":"Closing issue since there has been no activity for more than 2 months. Reopen if needed.\r\n"}}