-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmWy4hYACgkQONu9yGCS aT7SVBAAyx1DlSyJWcqzpESH0+VfqyWHxXlKS6Ip5wT0/+t0gglIKkwU/O0FsRXw pLO24wL0+MuIzgfZZj7wieAOPlGLOonKAvvUHGEMlpfAzyKjmZuW93WLKQlA/Oec uaT2ooQevRQcgXzbuV1yN/CeCnhbtmiQdcwy6OU5QACfzguQYtDbNGpbVHJEyEIW khlr+tj1KgRMzh/Sx76RPg4C/hkZBHun3tPcE0lTg+5QZDSkUj5gEdhVOSG2qmSh Lj9zt/isY3v6Whixel9YoTLr9SukI7ZlKzMrH1kSbGtTW3uZqgqB+7wCi1tWoNE1 Zwu9/kUe1dU1kfwYW8AA5OwupjBjADVnZZx1cKN3nQZG2J8bSKHwHmuZPx3DGhJ1 sxlaQ0nGvcEbCKljlIqsHzx2U22YKk939mVz5Y+MZYT5uwWRHI+iH4yRW97putSP t8tb3uX69Gsl6B+gLu38Mr7kkwyY06xmMnc5dfNCPwh8SxLj3dG7Gft90CNq1JKT q2cwlMEcDZRlC08kwzD7pRehZ6hYLRlTOv8yhQsQefcfzrtsT18Cec5TI2k72NOe fbIY8us3Qsr8JVSYuObGqT8LmkX9pkmRozEXgENvwltijEsWULoO2Hs+Z/yD07z8 RYqtxWxVxFVeHTkrXbbMUTZWhFx5LE+rtxCySpfeFkv0WgRRwa8= =vkKq -----END PGP SIGNATURE----- Merge 5.4.268 into android11-5.4-lts Changes in 5.4.268 f2fs: explicitly null-terminate the xattr list pinctrl: lochnagar: Don't build on MIPS ALSA: hda - Fix speaker and headset mic pin config for CHUWI CoreBook XPro ASoC: Intel: Skylake: Fix mem leak in few functions ASoC: nau8822: Fix incorrect type in assignment and cast to restricted __be16 ASoC: Intel: Skylake: mem leak in skl register function ASoC: cs43130: Fix the position of const qualifier ASoC: cs43130: Fix incorrect frame delay configuration ASoC: rt5650: add mutex to avoid the jack detection failure nouveau/tu102: flush all pdbs on vmm flush net/tg3: fix race condition in tg3_reset_task() ASoC: da7219: Support low DC impedance headset nvme: introduce helper function to get ctrl state drm/exynos: fix a potential error pointer dereference drm/exynos: fix a wrong error checking clk: rockchip: rk3128: Fix HCLK_OTG gate register jbd2: correct the printing of write_flags in jbd2_write_superblock() drm/crtc: Fix uninit-value bug in drm_mode_setcrtc neighbour: Don't let neigh_forced_gc() disable preemption for long tracing: Have large events show up as '[LINE TOO BIG]' instead of nothing tracing: Add size check when printing trace_marker output ring-buffer: Do not record in NMI if the arch does not support cmpxchg in NMI reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning Input: atkbd - skip ATKBD_CMD_GETID in translated mode Input: i8042 - add nomux quirk for Acer P459-G2-M s390/scm: fix virtual vs physical address confusion ARC: fix spare error Input: xpad - add Razer Wolverine V2 support ida: Fix crash in ida_free when the bitmap is empty ARM: sun9i: smp: fix return code check of of_property_match_string drm/crtc: fix uninitialized variable use ACPI: resource: Add another DMI match for the TongFang GMxXGxx binder: use EPOLLERR from eventpoll.h binder: fix trivial typo of binder_free_buf_locked() binder: fix comment on binder_alloc_new_buf() return value uio: Fix use-after-free in uio_open parport: parport_serial: Add Brainboxes BAR details parport: parport_serial: Add Brainboxes device IDs and geometry coresight: etm4x: Fix width of CCITMIN field x86/lib: Fix overflow when counting digits EDAC/thunderx: Fix possible out-of-bounds string access powerpc: add crtsavres.o to always-y instead of extra-y powerpc/44x: select I2C for CURRITUCK powerpc/pseries/memhotplug: Quieten some DLPAR operations powerpc/pseries/memhp: Fix access beyond end of drmem array selftests/powerpc: Fix error handling in FPU/VMX preemption tests powerpc/powernv: Add a null pointer check to scom_debug_init_one() powerpc/powernv: Add a null pointer check in opal_event_init() powerpc/powernv: Add a null pointer check in opal_powercap_init() powerpc/imc-pmu: Add a null pointer check in update_events_in_group() mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response ACPI: video: check for error while searching for backlight device parent ACPI: LPIT: Avoid u32 multiplication overflow net: netlabel: Fix kerneldoc warnings netlabel: remove unused parameter in netlbl_netlink_auditinfo() calipso: fix memory leak in netlbl_calipso_add_pass() spi: sh-msiof: Enforce fixed DTDL for R-Car H3 mtd: Fix gluebi NULL pointer dereference caused by ftl notifier selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket crypto: virtio - Handle dataq logic with tasklet crypto: virtio - don't use 'default m' virtio_crypto: Introduce VIRTIO_CRYPTO_NOSPC crypto: ccp - fix memleak in ccp_init_dm_workarea crypto: af_alg - Disallow multiple in-flight AIO requests crypto: sahara - remove FLAGS_NEW_KEY logic crypto: sahara - fix ahash selftest failure crypto: sahara - fix processing requests with cryptlen < sg->length crypto: sahara - fix error handling in sahara_hw_descriptor_create() pstore: ram_core: fix possible overflow in persistent_ram_init_ecc() gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump crypto: virtio - Wait for tasklet to complete on device remove crypto: sahara - fix ahash reqsize crypto: sahara - fix wait_for_completion_timeout() error handling crypto: sahara - improve error handling in sahara_sha_process() crypto: sahara - fix processing hash requests with req->nbytes < sg->length crypto: sahara - do not resize req->src when doing hash operations crypto: scomp - fix req->dst buffer overflow blocklayoutdriver: Fix reference leak of pnfs_device_node NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT wifi: rtw88: fix RX filter in FIF_ALLMULTI flag bpf, lpm: Fix check prefixlen before walking trie wifi: libertas: stop selecting wext ARM: dts: qcom: apq8064: correct XOADC register address ncsi: internal.h: Fix a spello net/ncsi: Fix netlink major/minor version numbers firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create() rtlwifi: Use ffs in <foo>_phy_calculate_bit_shift wifi: rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior scsi: fnic: Return error if vmalloc() failed arm64: dts: qcom: sdm845-db845c: correct LED panic indicator scsi: hisi_sas: Replace with standard error code return value selftests/net: fix grep checking for fib_nexthop_multiprefix virtio/vsock: fix logic which reduces credit update messages dma-mapping: clear dev->dma_mem to NULL after freeing it wifi: rtlwifi: add calculate_bit_shift() wifi: rtlwifi: rtl8188ee: phy: using calculate_bit_shift() wifi: rtlwifi: rtl8192c: using calculate_bit_shift() wifi: rtlwifi: rtl8192cu: using calculate_bit_shift() wifi: rtlwifi: rtl8192ce: using calculate_bit_shift() rtlwifi: rtl8192de: make arrays static const, makes object smaller wifi: rtlwifi: rtl8192de: using calculate_bit_shift() wifi: rtlwifi: rtl8192ee: using calculate_bit_shift() wifi: rtlwifi: rtl8192se: using calculate_bit_shift() netfilter: nf_tables: mark newset as dead on transaction abort Bluetooth: Fix bogus check for re-auth no supported with non-ssp Bluetooth: btmtkuart: fix recv_buf() return value ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim() ARM: davinci: always select CONFIG_CPU_ARM926T RDMA/usnic: Silence uninitialized symbol smatch warnings media: pvrusb2: fix use after free on context disconnection drm/bridge: Fix typo in post_disable() description f2fs: fix to avoid dirent corruption drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg() drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check() drm/radeon: check return value of radeon_ring_lock() ASoC: cs35l33: Fix GPIO name and drop legacy include ASoC: cs35l34: Fix GPIO name and drop legacy include drm/msm/mdp4: flush vblank event on disable drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks drm/drv: propagate errors from drm_modeset_register_all() drm/radeon: check the alloc_workqueue return value in radeon_crtc_init() drm/radeon/dpm: fix a memleak in sumo_parse_power_table drm/radeon/trinity_dpm: fix a memleak in trinity_parse_power_table drm/bridge: tc358767: Fix return value on error case media: cx231xx: fix a memleak in cx231xx_init_isoc media: dvbdev: drop refcount on error path in dvb_device_open() drm/amdgpu/debugfs: fix error code when smc register accessors are NULL drm/amd/pm: fix a double-free in si_dpm_init drivers/amd/pm: fix a use-after-free in kv_parse_power_table gpu/drm/radeon: fix two memleaks in radeon_vm_init drivers: clk: zynqmp: calculate closest mux rate watchdog: set cdev owner before adding watchdog/hpwdt: Only claim UNKNOWN NMI if from iLO watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling clk: si5341: fix an error code problem in si5341_output_clk_set_rate mmc: sdhci_omap: Fix TI SoC dependencies of: Fix double free in of_parse_phandle_with_args_map of: unittest: Fix of_count_phandle_with_args() expected value message binder: fix async space check for 0-sized buffers binder: fix use-after-free in shinker's callback Input: atkbd - use ab83 as id when skipping the getid command Revert "ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek" xen-netback: don't produce zero-size SKB frags binder: fix race between mmput() and do_exit() binder: fix unused alloc->free_async_space tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart Revert "usb: dwc3: Soft reset phy on probe for host" Revert "usb: dwc3: don't reset device side if dwc3 was configured as host-only" usb: chipidea: wait controller resume finished for wakeup irq Revert "usb: typec: class: fix typec_altmode_put_partner to put plugs" usb: typec: class: fix typec_altmode_put_partner to put plugs usb: mon: Fix atomicity violation in mon_bin_vma_fault ALSA: oxygen: Fix right channel of capture volume mixer fbdev: flush deferred work in fb_deferred_io_fsync() rootfs: Fix support for rootfstype= when root= is given wifi: rtlwifi: Remove bogus and dangerous ASPM disable/enable code wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors wifi: mwifiex: configure BSSID consistently when starting AP x86/kvm: Do not try to disable kvmclock if it was not enabled HID: wacom: Correct behavior when processing some confidence == false touches mips: Fix incorrect max_low_pfn adjustment MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup() MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup() serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed acpi: property: Let args be NULL in __acpi_node_get_property_reference software node: Let args be NULL in software_node_get_reference_args perf genelf: Set ELF program header addresses properly nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length nvmet-tcp: fix a crash in nvmet_req_complete() perf env: Add perf_env__numa_node() perf record: Move sb_evlist to 'struct record' perf top: Move sb_evlist to 'struct perf_top' perf bpf: Decouple creating the evlist from adding the SB event perf env: Avoid recursively taking env->bpf_progs.lock apparmor: avoid crash when parsed profile name is empty serial: imx: Correct clock error message in function probe() nvmet-tcp: Fix the H2C expected PDU len calculation PCI: keystone: Fix race condition when initializing PHYs s390/pci: fix max size calculation in zpci_memcpy_toio() net: qualcomm: rmnet: fix global oob in rmnet_policy net: phy: micrel: populate .soft_reset for KSZ9131 net: ravb: Fix dma_addr_t truncation in error case net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe netfilter: nf_tables: skip dead set elements in netlink dump ipvs: avoid stat macros calls from preemptible context kdb: Censor attempts to set PROMPT without ENABLE_MEM_READ kdb: Fix a potential buffer overflow in kdb_local() mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure i2c: s3c24xx: fix read transfers in polling mode i2c: s3c24xx: fix transferring more than one message in polling mode perf top: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set arm64: dts: armada-3720-turris-mox: set irq type for RTC Linux 5.4.268 Change-Id: I347fc44c3a9947e2b7cb476d622adca58677f78a Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
441 lines
16 KiB
C
441 lines
16 KiB
C
/*
|
|
* Copyright (c) 2016 Intel Corporation
|
|
*
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
* documentation for any purpose is hereby granted without fee, provided that
|
|
* the above copyright notice appear in all copies and that both that copyright
|
|
* notice and this permission notice appear in supporting documentation, and
|
|
* that the name of the copyright holders not be used in advertising or
|
|
* publicity pertaining to distribution of the software without specific,
|
|
* written prior permission. The copyright holders make no representations
|
|
* about the suitability of this software for any purpose. It is provided "as
|
|
* is" without express or implied warranty.
|
|
*
|
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
* OF THIS SOFTWARE.
|
|
*/
|
|
|
|
#ifndef __DRM_BRIDGE_H__
|
|
#define __DRM_BRIDGE_H__
|
|
|
|
#include <linux/list.h>
|
|
#include <linux/ctype.h>
|
|
#include <drm/drm_mode_object.h>
|
|
#include <drm/drm_modes.h>
|
|
|
|
struct drm_bridge;
|
|
struct drm_bridge_timings;
|
|
struct drm_panel;
|
|
|
|
/**
|
|
* struct drm_bridge_funcs - drm_bridge control functions
|
|
*/
|
|
struct drm_bridge_funcs {
|
|
/**
|
|
* @attach:
|
|
*
|
|
* This callback is invoked whenever our bridge is being attached to a
|
|
* &drm_encoder.
|
|
*
|
|
* The attach callback is optional.
|
|
*
|
|
* RETURNS:
|
|
*
|
|
* Zero on success, error code on failure.
|
|
*/
|
|
int (*attach)(struct drm_bridge *bridge);
|
|
|
|
/**
|
|
* @detach:
|
|
*
|
|
* This callback is invoked whenever our bridge is being detached from a
|
|
* &drm_encoder.
|
|
*
|
|
* The detach callback is optional.
|
|
*/
|
|
void (*detach)(struct drm_bridge *bridge);
|
|
|
|
/**
|
|
* @mode_valid:
|
|
*
|
|
* This callback is used to check if a specific mode is valid in this
|
|
* bridge. This should be implemented if the bridge has some sort of
|
|
* restriction in the modes it can display. For example, a given bridge
|
|
* may be responsible to set a clock value. If the clock can not
|
|
* produce all the values for the available modes then this callback
|
|
* can be used to restrict the number of modes to only the ones that
|
|
* can be displayed.
|
|
*
|
|
* This hook is used by the probe helpers to filter the mode list in
|
|
* drm_helper_probe_single_connector_modes(), and it is used by the
|
|
* atomic helpers to validate modes supplied by userspace in
|
|
* drm_atomic_helper_check_modeset().
|
|
*
|
|
* This function is optional.
|
|
*
|
|
* NOTE:
|
|
*
|
|
* Since this function is both called from the check phase of an atomic
|
|
* commit, and the mode validation in the probe paths it is not allowed
|
|
* to look at anything else but the passed-in mode, and validate it
|
|
* against configuration-invariant hardward constraints. Any further
|
|
* limits which depend upon the configuration can only be checked in
|
|
* @mode_fixup.
|
|
*
|
|
* RETURNS:
|
|
*
|
|
* drm_mode_status Enum
|
|
*/
|
|
enum drm_mode_status (*mode_valid)(struct drm_bridge *bridge,
|
|
const struct drm_display_mode *mode);
|
|
|
|
/**
|
|
* @mode_fixup:
|
|
*
|
|
* This callback is used to validate and adjust a mode. The parameter
|
|
* mode is the display mode that should be fed to the next element in
|
|
* the display chain, either the final &drm_connector or the next
|
|
* &drm_bridge. The parameter adjusted_mode is the input mode the bridge
|
|
* requires. It can be modified by this callback and does not need to
|
|
* match mode. See also &drm_crtc_state.adjusted_mode for more details.
|
|
*
|
|
* This is the only hook that allows a bridge to reject a modeset. If
|
|
* this function passes all other callbacks must succeed for this
|
|
* configuration.
|
|
*
|
|
* The mode_fixup callback is optional.
|
|
*
|
|
* NOTE:
|
|
*
|
|
* This function is called in the check phase of atomic modesets, which
|
|
* can be aborted for any reason (including on userspace's request to
|
|
* just check whether a configuration would be possible). Drivers MUST
|
|
* NOT touch any persistent state (hardware or software) or data
|
|
* structures except the passed in @state parameter.
|
|
*
|
|
* Also beware that userspace can request its own custom modes, neither
|
|
* core nor helpers filter modes to the list of probe modes reported by
|
|
* the GETCONNECTOR IOCTL and stored in &drm_connector.modes. To ensure
|
|
* that modes are filtered consistently put any bridge constraints and
|
|
* limits checks into @mode_valid.
|
|
*
|
|
* RETURNS:
|
|
*
|
|
* True if an acceptable configuration is possible, false if the modeset
|
|
* operation should be rejected.
|
|
*/
|
|
bool (*mode_fixup)(struct drm_bridge *bridge,
|
|
const struct drm_display_mode *mode,
|
|
struct drm_display_mode *adjusted_mode);
|
|
/**
|
|
* @disable:
|
|
*
|
|
* This callback should disable the bridge. It is called right before
|
|
* the preceding element in the display pipe is disabled. If the
|
|
* preceding element is a bridge this means it's called before that
|
|
* bridge's @disable vfunc. If the preceding element is a &drm_encoder
|
|
* it's called right before the &drm_encoder_helper_funcs.disable,
|
|
* &drm_encoder_helper_funcs.prepare or &drm_encoder_helper_funcs.dpms
|
|
* hook.
|
|
*
|
|
* The bridge can assume that the display pipe (i.e. clocks and timing
|
|
* signals) feeding it is still running when this callback is called.
|
|
*
|
|
* The disable callback is optional.
|
|
*/
|
|
void (*disable)(struct drm_bridge *bridge);
|
|
|
|
/**
|
|
* @post_disable:
|
|
*
|
|
* This callback should disable the bridge. It is called right after the
|
|
* preceding element in the display pipe is disabled. If the preceding
|
|
* element is a bridge this means it's called after that bridge's
|
|
* @post_disable function. If the preceding element is a &drm_encoder
|
|
* it's called right after the encoder's
|
|
* &drm_encoder_helper_funcs.disable, &drm_encoder_helper_funcs.prepare
|
|
* or &drm_encoder_helper_funcs.dpms hook.
|
|
*
|
|
* The bridge must assume that the display pipe (i.e. clocks and timing
|
|
* signals) feeding it is no longer running when this callback is
|
|
* called.
|
|
*
|
|
* The post_disable callback is optional.
|
|
*/
|
|
void (*post_disable)(struct drm_bridge *bridge);
|
|
|
|
/**
|
|
* @mode_set:
|
|
*
|
|
* This callback should set the given mode on the bridge. It is called
|
|
* after the @mode_set callback for the preceding element in the display
|
|
* pipeline has been called already. If the bridge is the first element
|
|
* then this would be &drm_encoder_helper_funcs.mode_set. The display
|
|
* pipe (i.e. clocks and timing signals) is off when this function is
|
|
* called.
|
|
*
|
|
* The adjusted_mode parameter is the mode output by the CRTC for the
|
|
* first bridge in the chain. It can be different from the mode
|
|
* parameter that contains the desired mode for the connector at the end
|
|
* of the bridges chain, for instance when the first bridge in the chain
|
|
* performs scaling. The adjusted mode is mostly useful for the first
|
|
* bridge in the chain and is likely irrelevant for the other bridges.
|
|
*
|
|
* For atomic drivers the adjusted_mode is the mode stored in
|
|
* &drm_crtc_state.adjusted_mode.
|
|
*
|
|
* NOTE:
|
|
*
|
|
* If a need arises to store and access modes adjusted for other
|
|
* locations than the connection between the CRTC and the first bridge,
|
|
* the DRM framework will have to be extended with DRM bridge states.
|
|
*/
|
|
void (*mode_set)(struct drm_bridge *bridge,
|
|
const struct drm_display_mode *mode,
|
|
const struct drm_display_mode *adjusted_mode);
|
|
/**
|
|
* @pre_enable:
|
|
*
|
|
* This callback should enable the bridge. It is called right before
|
|
* the preceding element in the display pipe is enabled. If the
|
|
* preceding element is a bridge this means it's called before that
|
|
* bridge's @pre_enable function. If the preceding element is a
|
|
* &drm_encoder it's called right before the encoder's
|
|
* &drm_encoder_helper_funcs.enable, &drm_encoder_helper_funcs.commit or
|
|
* &drm_encoder_helper_funcs.dpms hook.
|
|
*
|
|
* The display pipe (i.e. clocks and timing signals) feeding this bridge
|
|
* will not yet be running when this callback is called. The bridge must
|
|
* not enable the display link feeding the next bridge in the chain (if
|
|
* there is one) when this callback is called.
|
|
*
|
|
* The pre_enable callback is optional.
|
|
*/
|
|
void (*pre_enable)(struct drm_bridge *bridge);
|
|
|
|
/**
|
|
* @enable:
|
|
*
|
|
* This callback should enable the bridge. It is called right after
|
|
* the preceding element in the display pipe is enabled. If the
|
|
* preceding element is a bridge this means it's called after that
|
|
* bridge's @enable function. If the preceding element is a
|
|
* &drm_encoder it's called right after the encoder's
|
|
* &drm_encoder_helper_funcs.enable, &drm_encoder_helper_funcs.commit or
|
|
* &drm_encoder_helper_funcs.dpms hook.
|
|
*
|
|
* The bridge can assume that the display pipe (i.e. clocks and timing
|
|
* signals) feeding it is running when this callback is called. This
|
|
* callback must enable the display link feeding the next bridge in the
|
|
* chain if there is one.
|
|
*
|
|
* The enable callback is optional.
|
|
*/
|
|
void (*enable)(struct drm_bridge *bridge);
|
|
|
|
/**
|
|
* @atomic_pre_enable:
|
|
*
|
|
* This callback should enable the bridge. It is called right before
|
|
* the preceding element in the display pipe is enabled. If the
|
|
* preceding element is a bridge this means it's called before that
|
|
* bridge's @atomic_pre_enable or @pre_enable function. If the preceding
|
|
* element is a &drm_encoder it's called right before the encoder's
|
|
* &drm_encoder_helper_funcs.atomic_enable hook.
|
|
*
|
|
* The display pipe (i.e. clocks and timing signals) feeding this bridge
|
|
* will not yet be running when this callback is called. The bridge must
|
|
* not enable the display link feeding the next bridge in the chain (if
|
|
* there is one) when this callback is called.
|
|
*
|
|
* Note that this function will only be invoked in the context of an
|
|
* atomic commit. It will not be invoked from &drm_bridge_pre_enable. It
|
|
* would be prudent to also provide an implementation of @pre_enable if
|
|
* you are expecting driver calls into &drm_bridge_pre_enable.
|
|
*
|
|
* The @atomic_pre_enable callback is optional.
|
|
*/
|
|
void (*atomic_pre_enable)(struct drm_bridge *bridge,
|
|
struct drm_atomic_state *state);
|
|
|
|
/**
|
|
* @atomic_enable:
|
|
*
|
|
* This callback should enable the bridge. It is called right after
|
|
* the preceding element in the display pipe is enabled. If the
|
|
* preceding element is a bridge this means it's called after that
|
|
* bridge's @atomic_enable or @enable function. If the preceding element
|
|
* is a &drm_encoder it's called right after the encoder's
|
|
* &drm_encoder_helper_funcs.atomic_enable hook.
|
|
*
|
|
* The bridge can assume that the display pipe (i.e. clocks and timing
|
|
* signals) feeding it is running when this callback is called. This
|
|
* callback must enable the display link feeding the next bridge in the
|
|
* chain if there is one.
|
|
*
|
|
* Note that this function will only be invoked in the context of an
|
|
* atomic commit. It will not be invoked from &drm_bridge_enable. It
|
|
* would be prudent to also provide an implementation of @enable if
|
|
* you are expecting driver calls into &drm_bridge_enable.
|
|
*
|
|
* The enable callback is optional.
|
|
*/
|
|
void (*atomic_enable)(struct drm_bridge *bridge,
|
|
struct drm_atomic_state *state);
|
|
/**
|
|
* @atomic_disable:
|
|
*
|
|
* This callback should disable the bridge. It is called right before
|
|
* the preceding element in the display pipe is disabled. If the
|
|
* preceding element is a bridge this means it's called before that
|
|
* bridge's @atomic_disable or @disable vfunc. If the preceding element
|
|
* is a &drm_encoder it's called right before the
|
|
* &drm_encoder_helper_funcs.atomic_disable hook.
|
|
*
|
|
* The bridge can assume that the display pipe (i.e. clocks and timing
|
|
* signals) feeding it is still running when this callback is called.
|
|
*
|
|
* Note that this function will only be invoked in the context of an
|
|
* atomic commit. It will not be invoked from &drm_bridge_disable. It
|
|
* would be prudent to also provide an implementation of @disable if
|
|
* you are expecting driver calls into &drm_bridge_disable.
|
|
*
|
|
* The disable callback is optional.
|
|
*/
|
|
void (*atomic_disable)(struct drm_bridge *bridge,
|
|
struct drm_atomic_state *state);
|
|
|
|
/**
|
|
* @atomic_post_disable:
|
|
*
|
|
* This callback should disable the bridge. It is called right after the
|
|
* preceding element in the display pipe is disabled. If the preceding
|
|
* element is a bridge this means it's called after that bridge's
|
|
* @atomic_post_disable or @post_disable function. If the preceding
|
|
* element is a &drm_encoder it's called right after the encoder's
|
|
* &drm_encoder_helper_funcs.atomic_disable hook.
|
|
*
|
|
* The bridge must assume that the display pipe (i.e. clocks and timing
|
|
* signals) feeding it is no longer running when this callback is
|
|
* called.
|
|
*
|
|
* Note that this function will only be invoked in the context of an
|
|
* atomic commit. It will not be invoked from &drm_bridge_post_disable.
|
|
* It would be prudent to also provide an implementation of
|
|
* @post_disable if you are expecting driver calls into
|
|
* &drm_bridge_post_disable.
|
|
*
|
|
* The post_disable callback is optional.
|
|
*/
|
|
void (*atomic_post_disable)(struct drm_bridge *bridge,
|
|
struct drm_atomic_state *state);
|
|
};
|
|
|
|
/**
|
|
* struct drm_bridge_timings - timing information for the bridge
|
|
*/
|
|
struct drm_bridge_timings {
|
|
/**
|
|
* @input_bus_flags:
|
|
*
|
|
* Tells what additional settings for the pixel data on the bus
|
|
* this bridge requires (like pixel signal polarity). See also
|
|
* &drm_display_info->bus_flags.
|
|
*/
|
|
u32 input_bus_flags;
|
|
/**
|
|
* @setup_time_ps:
|
|
*
|
|
* Defines the time in picoseconds the input data lines must be
|
|
* stable before the clock edge.
|
|
*/
|
|
u32 setup_time_ps;
|
|
/**
|
|
* @hold_time_ps:
|
|
*
|
|
* Defines the time in picoseconds taken for the bridge to sample the
|
|
* input signal after the clock edge.
|
|
*/
|
|
u32 hold_time_ps;
|
|
/**
|
|
* @dual_link:
|
|
*
|
|
* True if the bus operates in dual-link mode. The exact meaning is
|
|
* dependent on the bus type. For LVDS buses, this indicates that even-
|
|
* and odd-numbered pixels are received on separate links.
|
|
*/
|
|
bool dual_link;
|
|
};
|
|
|
|
/**
|
|
* struct drm_bridge - central DRM bridge control structure
|
|
*/
|
|
struct drm_bridge {
|
|
/** @dev: DRM device this bridge belongs to */
|
|
struct drm_device *dev;
|
|
/** @encoder: encoder to which this bridge is connected */
|
|
struct drm_encoder *encoder;
|
|
/** @next: the next bridge in the encoder chain */
|
|
struct drm_bridge *next;
|
|
#ifdef CONFIG_OF
|
|
/** @of_node: device node pointer to the bridge */
|
|
struct device_node *of_node;
|
|
#endif
|
|
/** @list: to keep track of all added bridges */
|
|
struct list_head list;
|
|
/**
|
|
* @timings:
|
|
*
|
|
* the timing specification for the bridge, if any (may be NULL)
|
|
*/
|
|
const struct drm_bridge_timings *timings;
|
|
/** @funcs: control functions */
|
|
const struct drm_bridge_funcs *funcs;
|
|
/** @driver_private: pointer to the bridge driver's internal context */
|
|
void *driver_private;
|
|
};
|
|
|
|
void drm_bridge_add(struct drm_bridge *bridge);
|
|
void drm_bridge_remove(struct drm_bridge *bridge);
|
|
struct drm_bridge *of_drm_find_bridge(struct device_node *np);
|
|
int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
|
|
struct drm_bridge *previous);
|
|
|
|
bool drm_bridge_mode_fixup(struct drm_bridge *bridge,
|
|
const struct drm_display_mode *mode,
|
|
struct drm_display_mode *adjusted_mode);
|
|
enum drm_mode_status drm_bridge_mode_valid(struct drm_bridge *bridge,
|
|
const struct drm_display_mode *mode);
|
|
void drm_bridge_disable(struct drm_bridge *bridge);
|
|
void drm_bridge_post_disable(struct drm_bridge *bridge);
|
|
void drm_bridge_mode_set(struct drm_bridge *bridge,
|
|
const struct drm_display_mode *mode,
|
|
const struct drm_display_mode *adjusted_mode);
|
|
void drm_bridge_pre_enable(struct drm_bridge *bridge);
|
|
void drm_bridge_enable(struct drm_bridge *bridge);
|
|
|
|
void drm_atomic_bridge_disable(struct drm_bridge *bridge,
|
|
struct drm_atomic_state *state);
|
|
void drm_atomic_bridge_post_disable(struct drm_bridge *bridge,
|
|
struct drm_atomic_state *state);
|
|
void drm_atomic_bridge_pre_enable(struct drm_bridge *bridge,
|
|
struct drm_atomic_state *state);
|
|
void drm_atomic_bridge_enable(struct drm_bridge *bridge,
|
|
struct drm_atomic_state *state);
|
|
|
|
#ifdef CONFIG_DRM_PANEL_BRIDGE
|
|
struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel,
|
|
u32 connector_type);
|
|
void drm_panel_bridge_remove(struct drm_bridge *bridge);
|
|
struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev,
|
|
struct drm_panel *panel,
|
|
u32 connector_type);
|
|
#endif
|
|
|
|
#endif
|