Skip to content
Snippets Groups Projects
Select Git revision
  • 6897204ea3df808d342c8e4613135728bc538bcd
  • drm-misc-templates default
  • wip/final/kci-gitlab-lava-v1
  • wip/vignesh/kci-lava-gitlab-runner
  • kci-gitlab-igt-v8
  • kci-gitlab-igt-v4
  • drm-misc-fixes-2024-10-02
  • drm-misc-next-2024-09-26
  • drm-misc-fixes-2024-09-26
  • drm-misc-next-2024-09-20
  • drm-misc-fixes-2024-09-12
  • drm-misc-fixes-2024-09-05
  • drm-misc-next-fixes-2024-09-05
  • drm-misc-fixes-2024-08-29
  • drm-misc-next-2024-08-29
  • drm-misc-next-2024-08-22
  • drm-misc-fixes-2024-08-22
  • drm-misc-next-2024-08-16
  • drm-misc-fixes-2024-08-15
  • drm-misc-next-2024-08-09
  • drm-misc-fixes-2024-08-08
  • drm-misc-next-2024-08-01
  • drm-misc-fixes-2024-08-01
  • drm-misc-next-fixes-2024-07-25
  • drm-misc-next-fixes-2024-07-19
  • drm-misc-next-fixes-2024-07-11
26 results

drm_connector.c

Blame
  • drm_connector.c 105.42 KiB
    /*
     * 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.
     */
    
    #include <drm/drm_auth.h>
    #include <drm/drm_connector.h>
    #include <drm/drm_drv.h>
    #include <drm/drm_edid.h>
    #include <drm/drm_encoder.h>
    #include <drm/drm_file.h>
    #include <drm/drm_managed.h>
    #include <drm/drm_panel.h>
    #include <drm/drm_print.h>
    #include <drm/drm_privacy_screen_consumer.h>
    #include <drm/drm_sysfs.h>
    #include <drm/drm_utils.h>
    
    #include <linux/property.h>
    #include <linux/uaccess.h>
    
    #include <video/cmdline.h>
    
    #include "drm_crtc_internal.h"
    #include "drm_internal.h"
    
    /**
     * DOC: overview
     *
     * In DRM connectors are the general abstraction for display sinks, and include
     * also fixed panels or anything else that can display pixels in some form. As
     * opposed to all other KMS objects representing hardware (like CRTC, encoder or
     * plane abstractions) connectors can be hotplugged and unplugged at runtime.
     * Hence they are reference-counted using drm_connector_get() and
     * drm_connector_put().
     *
     * KMS driver must create, initialize, register and attach at a &struct
     * drm_connector for each such sink. The instance is created as other KMS
     * objects and initialized by setting the following fields. The connector is
     * initialized with a call to drm_connector_init() with a pointer to the
     * &struct drm_connector_funcs and a connector type, and then exposed to
     * userspace with a call to drm_connector_register().
     *
     * Connectors must be attached to an encoder to be used. For devices that map
     * connectors to encoders 1:1, the connector should be attached at
     * initialization time with a call to drm_connector_attach_encoder(). The
     * driver must also set the &drm_connector.encoder field to point to the
     * attached encoder.
     *
     * For connectors which are not fixed (like built-in panels) the driver needs to
     * support hotplug notifications. The simplest way to do that is by using the
     * probe helpers, see drm_kms_helper_poll_init() for connectors which don't have
     * hardware support for hotplug interrupts. Connectors with hardware hotplug