mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
Compare commits
5 Commits
45d3dba58f
...
a8c4c464b7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8c4c464b7 | ||
|
|
d04e379ac5 | ||
|
|
e8017d9f2d | ||
|
|
fd2dff75cd | ||
|
|
3df21d5eaa |
@@ -131,6 +131,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
|
||||
i2s-dac.dtbo \
|
||||
i2s-gpio28-31.dtbo \
|
||||
i2s-master-dac.dtbo \
|
||||
ilitek-ts-i2c.dtbo \
|
||||
ilitek251x.dtbo \
|
||||
imx219.dtbo \
|
||||
imx258.dtbo \
|
||||
|
||||
@@ -2778,6 +2778,17 @@ Load: dtoverlay=i2s-master-dac
|
||||
Params: <None>
|
||||
|
||||
|
||||
Name: ilitek-ts-i2c
|
||||
Info: Enables I2C connected Ilitek 23XX, 25XX, and 213X touch controllers
|
||||
using GPIO 4 (pin 7 on GPIO header) for interrupt.
|
||||
Load: dtoverlay=ilitek-ts-i2c,<param>=<val>
|
||||
Params: interrupt GPIO used for interrupt (default 4)
|
||||
invx Touchscreen inverted x axis
|
||||
invy Touchscreen inverted y axis
|
||||
swapxy Touchscreen swapped x y axis
|
||||
i2c-path Override I2C path to allow for i2c-gpio buses
|
||||
|
||||
|
||||
Name: ilitek251x
|
||||
Info: Enables I2C connected Ilitek 251x multiple touch controller using
|
||||
GPIO 4 (pin 7 on GPIO header) for interrupt.
|
||||
|
||||
62
arch/arm/boot/dts/overlays/ilitek-ts-i2c-overlay.dts
Normal file
62
arch/arm/boot/dts/overlays/ilitek-ts-i2c-overlay.dts
Normal file
@@ -0,0 +1,62 @@
|
||||
// Device tree overlay for I2C connected Ilitek multiple touch controller
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target = <&gpio>;
|
||||
__overlay__ {
|
||||
ili2130_pins: ili2130_pins {
|
||||
brcm,pins = <4>; // interrupt
|
||||
brcm,function = <0>; // in
|
||||
brcm,pull = <2>; // pull-up
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
frag1: fragment@1 {
|
||||
target = <&i2c1>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
ili2130: ili2130@41 {
|
||||
compatible = "ilitek,ili2130";
|
||||
reg = <0x41>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ili2130_pins>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&ili2130>;
|
||||
__overlay__ {
|
||||
touchscreen-inverted-x;
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&ili2130>;
|
||||
__overlay__ {
|
||||
touchscreen-inverted-y;
|
||||
};
|
||||
};
|
||||
|
||||
__overrides__ {
|
||||
interrupt = <&ili2130_pins>,"brcm,pins:0",
|
||||
<&ili2130>,"interrupts:0";
|
||||
i2c-path = <&frag1>, "target?=0",
|
||||
<&frag1>, "target-path";
|
||||
invx = <0>, "-2";
|
||||
invy = <0>, "-3";
|
||||
swapxy = <&ili2130>,"touchscreen-swapped-x-y?";
|
||||
};
|
||||
};
|
||||
@@ -2,6 +2,8 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
@@ -29,7 +31,7 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ili251x_pins>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <4 8>; // high-to-low edge triggered
|
||||
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
|
||||
touchscreen-size-x = <16384>;
|
||||
touchscreen-size-y = <9600>;
|
||||
};
|
||||
|
||||
@@ -640,6 +640,7 @@ CONFIG_TOUCHSCREEN_EGALAX=m
|
||||
CONFIG_TOUCHSCREEN_EXC3000=m
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
||||
CONFIG_TOUCHSCREEN_ILI210X=m
|
||||
CONFIG_TOUCHSCREEN_ILITEK=m
|
||||
CONFIG_TOUCHSCREEN_EDT_FT5X06=m
|
||||
CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
|
||||
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
|
||||
|
||||
@@ -673,6 +673,7 @@ CONFIG_TOUCHSCREEN_EGALAX=m
|
||||
CONFIG_TOUCHSCREEN_EXC3000=m
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
||||
CONFIG_TOUCHSCREEN_ILI210X=m
|
||||
CONFIG_TOUCHSCREEN_ILITEK=m
|
||||
CONFIG_TOUCHSCREEN_EDT_FT5X06=m
|
||||
CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
|
||||
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
|
||||
|
||||
@@ -634,6 +634,7 @@ CONFIG_TOUCHSCREEN_EGALAX=m
|
||||
CONFIG_TOUCHSCREEN_EXC3000=m
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
||||
CONFIG_TOUCHSCREEN_ILI210X=m
|
||||
CONFIG_TOUCHSCREEN_ILITEK=m
|
||||
CONFIG_TOUCHSCREEN_EDT_FT5X06=m
|
||||
CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
|
||||
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
|
||||
|
||||
@@ -707,6 +707,7 @@ CONFIG_TOUCHSCREEN_EGALAX=m
|
||||
CONFIG_TOUCHSCREEN_EXC3000=m
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
||||
CONFIG_TOUCHSCREEN_ILI210X=m
|
||||
CONFIG_TOUCHSCREEN_ILITEK=m
|
||||
CONFIG_TOUCHSCREEN_EDT_FT5X06=m
|
||||
CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
|
||||
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
|
||||
|
||||
@@ -707,6 +707,7 @@ CONFIG_TOUCHSCREEN_EGALAX=m
|
||||
CONFIG_TOUCHSCREEN_EXC3000=m
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
||||
CONFIG_TOUCHSCREEN_ILI210X=m
|
||||
CONFIG_TOUCHSCREEN_ILITEK=m
|
||||
CONFIG_TOUCHSCREEN_EDT_FT5X06=m
|
||||
CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
|
||||
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
|
||||
|
||||
@@ -710,6 +710,7 @@ CONFIG_TOUCHSCREEN_EGALAX=m
|
||||
CONFIG_TOUCHSCREEN_EXC3000=m
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
||||
CONFIG_TOUCHSCREEN_ILI210X=m
|
||||
CONFIG_TOUCHSCREEN_ILITEK=m
|
||||
CONFIG_TOUCHSCREEN_EDT_FT5X06=m
|
||||
CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
|
||||
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
|
||||
|
||||
@@ -802,7 +802,10 @@ static unsigned int vc4_lbm_components(const struct drm_plane_state *state,
|
||||
if (info->is_yuv)
|
||||
return channel ? 2 : 1;
|
||||
|
||||
if (info->has_alpha)
|
||||
if (vc4_state->y_scaling[channel] == VC4_SCALING_TPZ)
|
||||
return 4;
|
||||
|
||||
if (info->has_alpha && state->alpha == DRM_BLEND_ALPHA_OPAQUE)
|
||||
return 4;
|
||||
|
||||
return 3;
|
||||
@@ -812,11 +815,8 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
|
||||
unsigned int channel)
|
||||
{
|
||||
const struct drm_format_info *info = state->fb->format;
|
||||
const struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
|
||||
unsigned int channels_scaled = 0;
|
||||
unsigned int components, words, wpc;
|
||||
unsigned int width, lines;
|
||||
unsigned int i;
|
||||
|
||||
/* LBM is meant to use the smaller of source or dest width, but there
|
||||
* is a issue with UV scaling that the size required for the second
|
||||
@@ -836,20 +836,10 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
|
||||
if (!components)
|
||||
return 0;
|
||||
|
||||
if (state->alpha != DRM_BLEND_ALPHA_OPAQUE && info->has_alpha)
|
||||
components -= 1;
|
||||
|
||||
words = width * wpc * components;
|
||||
|
||||
lines = DIV_ROUND_UP(words, 128 / info->hsub);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
if (vc4_state->y_scaling[channel] != VC4_SCALING_NONE)
|
||||
channels_scaled++;
|
||||
|
||||
if (channels_scaled == 1)
|
||||
lines = lines / 2;
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user