Commit graph

12 commits

Author SHA1 Message Date
Sergey Volk
b5769ac1f1 Fix permissions for dp_hotplug_error_code sysfs node
DisplayPort kernel driver passes error code/status to hardware composer
via the dp_hotplug_error_code sysfs file. When HWC receives/consumes
the error, it will write "0" into that file to reset the error code. So
this file must be readable and writable by the HWC code running with
"system" user/group permissions.
Previously we used to set the ownership to system:system, but in order
to be more consistent with the rest of sysfs files in that directory,
we can use root:graphics instead with permissions 0664. HWC runs
under the "graphics" group, so this should allow HWC write access.

Bug: 324953626
Test: checked permissions of dp_hotplug_error_code sysfs
Change-Id: Idf65acc12d158a78565c41f4e2aea24362e2cdff
2024-02-14 00:58:35 +00:00
RD Babiera
3082aa7f48 usb: report displayport capable port partner disconnect to drm
On port-partner remove, write to drm's usbc_cable_disconnect
node if setupDisplayPortPoll() had run previously in the
connection, flagged by mPartnerSupportsDisplayPort.

Test: manual test on device
Bug: 303820069
Change-Id: I3478f2f027540972647044716a1a3e832ae1b152
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-12-11 22:34:53 +00:00
Jacky Liu
a3772510e6 Update i2c pathes with new static i2c bus numbers
Bug: 305242309
Test: Boot to home
Change-Id: I87687b2e3a479a166257ad958ddd07af7967f416
2023-10-23 14:17:22 +08:00
RD Babiera
5cc2bfebf4 Merge "usb: enable/disable displayport alt mode through enableUsbData" into main 2023-10-13 21:23:38 +00:00
RD Babiera
05cedc1314 usb: enable/disable displayport alt mode through enableUsbData
Adds functionality for enabling and disabling DisplayPort Alt Mode
on the port through enableUsbData in the USB HAL to comply with USB
restrictions for heightened security mode.

Test: manual test on device - use enableUsbData dumpsys command to
      turn off DisplayPort and then turn it back on while connected to a
      partner sink.
Bug: 297208252
Change-Id: I9f071bce802b728f2229abc08efb2204e4c2505a
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-20 19:52:07 +00:00
Amit Sunil Dhamne
e683802386 UsbGadget: Update SDP enum timeout when gadget is pulled up
Indicate to the kernel that the usb gadget is pulled up
by writing to `update_sdp_enum_timeout` sysfs node. Write
to this node will inform the kernel that it can lower the SDP
timeout alarm value which is used to detect an SDP port
vs a DCP.

(ported from c5c5b127a7ed0db559d286284fe77b656bef6945)

Bug:275687235
Test: Check `update_sdp_enum_timeout` is written into after usb
     gadget is pulled up. Verify that the alarm timeout lowers.
Change-Id: Id3ae7e7a20b236cec6604414a7f81860e868bdd0
Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
2023-09-19 13:45:30 -07:00
Badhri Jagan Sridharan
412f31194c Usb: Signal irq_hpd to drm stack
Monitor typec stack for irq_hpd events and signal irq_hpd when the
irq_hpd counter value read is not the same as the previously cached
value.

Bug: 278307874
Change-Id: Id4a72afcf85550cabbc2f9469bb0ccb92cd02ad2
2023-05-25 04:36:06 +00:00
Treehugger Robot
5aa6158425 [conflict] Merge "usb: add all i2c number" into udc-d1-dev am: 6f1e1dca4a
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma/+/22122384

Change-Id: I0a4b28d87efdfeb7629d0c3a36fde232f45cc3ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-11 04:24:17 +00:00
Chien Kun Niu
5bda84b517 usb: add all i2c number
Add all I2c number to change the permission

Bug: 273391794
Test: limit 1.3A work
Change-Id: Iefb44f37c5b42ae5579e928477efc927d270b724
2023-04-07 15:26:49 +08:00
RD Babiera
de0fc9d220 Port dp changes to drm sysfs
Write pin assignment, hpd, and orientation from type-c class to
drmdp platform device attributes using epoll when displayport
driver binds to device, and determine whether or not to shut down
epoll on displayport driver change uevents.

Test: manual testing with form factor device
Bug: 260915739
Change-Id: Iec9fc76166481a4611bb2fc023aea044b497f2c0
2023-04-03 22:16:17 +00:00
Ricky Niu
4d736354f3 usb: limit the current to 1.3A when connect to accessory
For imporve USB stability, limit the current to 1.3A,
when connect to accessory.

Bug: 206635552
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I2c1091aa7111e6242cc949923fbc86f27e54e976
(cherry picked from commit e6cacbcff21d315763943469038c9ca8822a7f37)
2023-02-22 06:42:06 +00:00
Aaron Ding
d88f9a90bd Branch zuma from gs201
Branch zuma from gs201 sha1 9009acf5c217f553b45ea82aa0702607229f0347

cp/pantah/ripcurrent
cp/gs201/zuma

Bug: 229340586
Change-Id: Ia312c20dae892ead9bf06728b4ef5c0c260ad045
Signed-off-by: Aaron Ding <aaronding@google.com>
2022-04-19 12:45:55 +08:00