Merge 4.19.161 into android-4.19-stable
Changes in 4.19.161
perf event: Check ref_reloc_sym before using it
netfilter: clear skb->next in NF_HOOK_LIST()
btrfs: don't access possibly stale fs_info data for printing duplicate device
btrfs: fix lockdep splat when reading qgroup config on mount
wireless: Use linux/stddef.h instead of stddef.h
KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace
KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint
KVM: x86: Fix split-irqchip vs interrupt injection window request
arm64: pgtable: Fix pte_accessible()
arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()
drm/atomic_helper: Stop modesets on unregistered connectors harder
ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close
HID: cypress: Support Varmilo Keyboards' media hotkeys
HID: add support for Sega Saturn
Input: i8042 - allow insmod to succeed on devices without an i8042 controller
HID: hid-sensor-hub: Fix issue with devices with no report ID
HID: add HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE for Gamevice devices
dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant
x86/xen: don't unbind uninitialized lock_kicker_irq
HID: Add Logitech Dinovo Edge battery quirk
proc: don't allow async path resolution of /proc/self components
nvme: free sq/cq dbbuf pointers when dbbuf set fails
dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size
scsi: libiscsi: Fix NOP race condition
scsi: target: iscsi: Fix cmd abort fabric stop race
perf/x86: fix sysfs type mismatches
xtensa: uaccess: Add missing __user to strncpy_from_user() prototype
phy: tegra: xusb: Fix dangling pointer on probe failure
batman-adv: set .owner to THIS_MODULE
ARM: dts: dra76x: m_can: fix order of clocks
scsi: ufs: Fix race between shutdown and runtime resume flow
bnxt_en: fix error return code in bnxt_init_one()
bnxt_en: fix error return code in bnxt_init_board()
video: hyperv_fb: Fix the cache type when mapping the VRAM
bnxt_en: Release PCI regions when DMA mask setup fails during probe.
cxgb4: fix the panic caused by non smac rewrite
s390/qeth: fix tear down of async TX buffers
IB/mthca: fix return value of error branch in mthca_init_cq()
nfc: s3fwrn5: use signed integer for parsing GPIO numbers
net: ena: set initial DMA width to avoid intel iommu issue
ibmvnic: fix NULL pointer dereference in reset_sub_crq_queues
ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq
optee: add writeback to valid memory type
efivarfs: revert "fix memory leak in efivarfs_create()"
can: gs_usb: fix endianess problem with candleLight firmware
platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time
platform/x86: toshiba_acpi: Fix the wrong variable assignment
can: m_can: fix nominal bitiming tseg2 min for version >= 3.1
perf probe: Fix to die_entrypc() returns error correctly
USB: core: Change %pK for __user pointers to %px
usb: gadget: f_midi: Fix memleak in f_midi_alloc
USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card
usb: gadget: Fix memleak in gadgetfs_fill_super
x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb
x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak
x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak
USB: core: Fix regression in Hercules audio card
Linux 4.19.161
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib704b9ff60755978b272aa358d25ddb217cc37bc
This commit is contained in:
@@ -82,6 +82,53 @@ enum drm_connector_status {
|
||||
connector_status_unknown = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum drm_connector_registration_status - userspace registration status for
|
||||
* a &drm_connector
|
||||
*
|
||||
* This enum is used to track the status of initializing a connector and
|
||||
* registering it with userspace, so that DRM can prevent bogus modesets on
|
||||
* connectors that no longer exist.
|
||||
*/
|
||||
enum drm_connector_registration_state {
|
||||
/**
|
||||
* @DRM_CONNECTOR_INITIALIZING: The connector has just been created,
|
||||
* but has yet to be exposed to userspace. There should be no
|
||||
* additional restrictions to how the state of this connector may be
|
||||
* modified.
|
||||
*/
|
||||
DRM_CONNECTOR_INITIALIZING = 0,
|
||||
|
||||
/**
|
||||
* @DRM_CONNECTOR_REGISTERED: The connector has been fully initialized
|
||||
* and registered with sysfs, as such it has been exposed to
|
||||
* userspace. There should be no additional restrictions to how the
|
||||
* state of this connector may be modified.
|
||||
*/
|
||||
DRM_CONNECTOR_REGISTERED = 1,
|
||||
|
||||
/**
|
||||
* @DRM_CONNECTOR_UNREGISTERED: The connector has either been exposed
|
||||
* to userspace and has since been unregistered and removed from
|
||||
* userspace, or the connector was unregistered before it had a chance
|
||||
* to be exposed to userspace (e.g. still in the
|
||||
* @DRM_CONNECTOR_INITIALIZING state). When a connector is
|
||||
* unregistered, there are additional restrictions to how its state
|
||||
* may be modified:
|
||||
*
|
||||
* - An unregistered connector may only have its DPMS changed from
|
||||
* On->Off. Once DPMS is changed to Off, it may not be switched back
|
||||
* to On.
|
||||
* - Modesets are not allowed on unregistered connectors, unless they
|
||||
* would result in disabling its assigned CRTCs. This means
|
||||
* disabling a CRTC on an unregistered connector is OK, but enabling
|
||||
* one is not.
|
||||
* - Removing a CRTC from an unregistered connector is OK, but new
|
||||
* CRTCs may never be assigned to an unregistered connector.
|
||||
*/
|
||||
DRM_CONNECTOR_UNREGISTERED = 2,
|
||||
};
|
||||
|
||||
enum subpixel_order {
|
||||
SubPixelUnknown = 0,
|
||||
SubPixelHorizontalRGB,
|
||||
@@ -894,10 +941,12 @@ struct drm_connector {
|
||||
bool ycbcr_420_allowed;
|
||||
|
||||
/**
|
||||
* @registered: Is this connector exposed (registered) with userspace?
|
||||
* @registration_state: Is this connector initializing, exposed
|
||||
* (registered) with userspace, or unregistered?
|
||||
*
|
||||
* Protected by @mutex.
|
||||
*/
|
||||
bool registered;
|
||||
enum drm_connector_registration_state registration_state;
|
||||
|
||||
/**
|
||||
* @modes:
|
||||
@@ -1276,6 +1325,24 @@ static inline void drm_connector_unreference(struct drm_connector *connector)
|
||||
drm_connector_put(connector);
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_connector_is_unregistered - has the connector been unregistered from
|
||||
* userspace?
|
||||
* @connector: DRM connector
|
||||
*
|
||||
* Checks whether or not @connector has been unregistered from userspace.
|
||||
*
|
||||
* Returns:
|
||||
* True if the connector was unregistered, false if the connector is
|
||||
* registered or has not yet been registered with userspace.
|
||||
*/
|
||||
static inline bool
|
||||
drm_connector_is_unregistered(struct drm_connector *connector)
|
||||
{
|
||||
return READ_ONCE(connector->registration_state) ==
|
||||
DRM_CONNECTOR_UNREGISTERED;
|
||||
}
|
||||
|
||||
const char *drm_get_connector_status_name(enum drm_connector_status status);
|
||||
const char *drm_get_subpixel_order_name(enum subpixel_order order);
|
||||
const char *drm_get_dpms_name(int val);
|
||||
|
||||
Reference in New Issue
Block a user