The asserts and validation code were incorrectly mixing pitch and
width. These incorrect checks were preventing rendering code from
re-using a smaller section of a buffer allocated to fit the full
screen. We expect to be able to update a portion of the display from a
portion of the buffer, in which case pitch must remain the screen
width. Expecting x + pitch to be smaller than the screen width is
incorrect.
Signed-off-by: Nathan Collins <nathan.collins@kdab.com>
For historical reasons, inversion mode is enabled by default in the
current implementation. This commit introduces an `inversion-off`
boolean DTS property, allowing it to be disabled if necessary.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Add driver for ST7796s display. This is a MIPI DBI display controller,
with a frame memory of 320x480x18 pixels. Support for 4 wire SPI mode is
implemented using the MIPI DBI API.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
For now DSI settings are hard-coded for the specific
LCD module used on the STM32H747I Discovery board
Signed-off-by: Erik Andersson <erian747@gmail.com>
Exhibit Renesas LCD controller's driver implementation. The driver
is intended to employ the controller in the continuous mode so
it can drive display panels in the parallel RGB mode.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Implement the set_format API so that applications can change format
at runtime instead of using the predefined one in the device tree.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add support for ARGB8888 pixel format as the camera pipeline on i.MX
RT11xx could output images in this format
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
- Removed unused variables from the data struct
- Set all members of capability struct in `ssd1306_get_capabilities`
instead of zeroing it. This has the same effect but saves some bytes.
- Removed empty log
Signed-off-by: Greter Raffael <rgreter@baumer.com>
This allows to invert the display at runtime using the function
`ssd1306_set_pixel_format`. The current format is stored in the data
struct.
Also adjusted `ssd1306_get_capabilities` to return both supported
formats and the current one.
From the ssd1306 doc: 'In normal display a RAM data of 1 indicates an
"ON" pixel while in inverse display a RAM data of 0 indicates an "ON"
pixel.' Thus `PIXEL_FORMAT_MONO01 == SSD1306_SET_NORMAL_DISPLAY`.
Signed-off-by: Greter Raffael <rgreter@baumer.com>
Drop a bunch of display functions that only return "not supported", the
display API already handles these by checking for NULL API function
pointer.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Display is not working on STM32F429i-DISC1 board because
display_blanking_off() needs to be sent to ILI9341 device, but it's sent
to LTDC instead which does not implement it.
This patch adds a LTDC DT property that provides the pHandle of the
display's own controller so that display_blanking_off/on are forwarded to
it when they are called by an application.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Check the return code of mipi_dbi_reset, and do not delay for the reset
wait time unless the mipi controller has issued a hardware reset to the
display.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Fix usage of MIPI buffer descriptor in ili9xxx driver. Previously, the
buffer descriptor size was being set to display buffer size. For cases
where the write height/width was not equal to the size of the buffer, this
resulted in additional data being written that was not needed. To
resolve this, calculate the mipi descriptor buffer size in the driver
Also, remove the unconditional setting of mipi_desc.height, as this
would override the previous (correct) setting.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Convert ili9xxx display drivers to use MIPI DBI API. Due to the fact
this change requires a new devicetree structure for the display driver
to build, required devicetree changes are also included in this commit
for all boards and shields defining an instance of an ili9xxx display.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Use 'struct uc81xx_tres16' for 16-bit 'tres' setup, instead of 'struct
uc81xx_tres8'. This fixes a regression when support for 'uc8175' was added
and 'struct uc81xx_tres' was replaced with 'struct uc81xx_tres16'.
Fixes: 7c46b0b898 ("drivers: display: uc81xx: add support for uc8175")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Adding driver for GC9A01A 240x240 based LCD displays.
Should be working with GC9C01 as well (untested).
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
Fixed an issue where `display_read()` in the SDL driver was not working.
In the current implementation, use texture to represent screen images.
To read this, draw it once on another surface and then read it.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add SDL_DISPLAY_USE_HARDWARE_ACCELEREATOR to be able to switch
enable/disable hardware accelerator.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Updated API version enables multi-instance GPIOTE driver.
Additionally obsolete symbol that was used to specify
API version in the past was removed.
Affected drivers have been adjusted and appropriate changes
in affected files have been made.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
Using SDL_DISPLAY_ZOOM_PCT would cause mouse pointer/touch input
to not click at the correct position.
Signed-off-by: Jakob Krantz <mail@jakobkrantz.se>
Add support for uc8175 display driver. uc8175 has a slightly
different command/data length requirements for certain registers,
namely TRES and PTL, compared to uc8176/uc8179
This commit refactors the driver code and such that setting TRES and PTL
registers are now done by function pointers provided by config->quirks,
by the same token as how it is done for setting CDI register
Signed-off-by: Xiao Qin <xiaoq@google.com>
As the display API now check against valid callback functions and
returns -ENOSYS (or equalent), there is no need to provide
such functions in the driver code
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
As the display API now check against valid callback functions and
returns -ENOSYS (or equalent), there is no need to provide
such functions in the driver code.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
This option let specify at startup the zoom factor to apply on the
SDL window. See CONFIG_SDL_DISPLAY_ZOOM_PCT.
Signed-off-by: Arnaud MAZIN <arnaud.mazin@gmail.com>
The pm_policy_state_lock_put and pm_policy_state_lock_put functions
already become a no-op if CONFIG_PM is not enabled. Drop the guards
around it in few different drivers.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add device level power management to rm67162 display. Device level power
management for this controller calls the MIPI DSI detach API, in order
to power down the MIPI DPHY when the display is not active.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Fix settings for TEAR and DPHYCMD0 to match initialization data
provided by MCUX SDK driver. The following fixes were needed:
- Tear effect signal should only be sent at the VBLANK interval, so TEON
should be set to 0x0
- DPHYCMD0 LP-RX VHYS trimming was incorrectly being set to 37mV, when
it should be set to 66mV (the default value)
These changes resolve some flickering and blooming that occasionally
occurred during initialization
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
When backlight pin is not defined, a display suspend will cause
a crash since it looks at the wrong pin when deciding if
it exists.
Signed-off-by: Emil Lindqvist <emil@lindq.gr>
With update to handle DSI transfer length in MIPI_DSI driver, the logic
can be removed from the RM67162 driver. The driver now will simply
continue writing data until the full buffer is sent.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Support connecting different display for each SPI and I2C
at the same time.
In a case like DTS below.
```
&spi1 {
ssd1306_spi: ssd1306@0 {
compatible = "solomon,ssd1306fb";
...
};
};
&i2c0 {
ssd1306_i2c: ssd1306@3c {
compatible = "solomon,ssd1306fb";
...
};
};
```
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Determine sh1106 from the `compatibility` value instead of
the SSD1306_CONTROLLER_TYPE setting.
Change the settings in `boards/shields/ssd1306/sh1106_128x64.overlay`
to follow this change.
Remove the SSD1306_CONTROLLER_TYPE from its Kconfig.defconfig,
and set the `compatibility` to `sinowealth,sh1106`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
When multiple devices are connected, the SSD1306_REVERSE_MODE setting
cannot switch for each device.
Add an equivalent setting to the devicetree properties to replace it.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Store properties defined in dts in ssd1306_config's fields.
And replace code that uses DT_INST_PROP (0, ...) by config properties.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
ST7735S requires the COLMOD command be repeated as part of writing
pixels, otherwise it goes back to some kind of default which is likely
wrong.
ST7735S works correctly after this plus the previous two commits; tested
on STM32L462 + KD0096FM.
Signed-off-by: David Lamparter <equinox@diac24.net>
Use a continuous transaction with CS kept low for the entire batch of
row address, column address and actual pixel data write. This is
required by ST7735S and shouldn't hurt elsewhere.
Signed-off-by: David Lamparter <equinox@diac24.net>
Seems like the SSD1306 controller needs a bit of time after power up
before it can take i2c commands. This causes problems with
microcontrollers that have no other delays in the startup sequence, like
rpi_pico.
There's currently no good way of modeling this in Zephyr right now, and
there's also no clear indication of how much time the device needs in
the datasheet that I could find, but it seems like 10ms is enough for
that to start reliably so add a delay in the ssd1306 init function to
ensure that at least that time has passed from system power up.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).
To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.
All files including CMSIS have been updated.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add driver for HX8394 TFT LCD controller. This controller is driven via
MIPI DSI, and is configured for a 720x1280 display
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>