Skip to content
Snippets Groups Projects
Select Git revision
  • 9a4b7d4c769e7513dec8f441de1f521ec4ead4b6
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

amdgpu_kms.c

Blame
  • amdgpu_atpx_handler.c 16.81 KiB
    /*
     * Copyright (c) 2010 Red Hat Inc.
     * Author : Dave Airlie <airlied@redhat.com>
     *
     * Licensed under GPLv2
     *
     * ATPX support for both Intel/ATI
     */
    #include <linux/vga_switcheroo.h>
    #include <linux/slab.h>
    #include <linux/acpi.h>
    #include <linux/pci.h>
    #include <linux/delay.h>
    
    #include "amd_acpi.h"
    
    #define AMDGPU_PX_QUIRK_FORCE_ATPX  (1 << 0)
    
    struct amdgpu_px_quirk {
    	u32 chip_vendor;
    	u32 chip_device;
    	u32 subsys_vendor;
    	u32 subsys_device;
    	u32 px_quirk_flags;
    };
    
    struct amdgpu_atpx_functions {
    	bool px_params;
    	bool power_cntl;
    	bool disp_mux_cntl;
    	bool i2c_mux_cntl;
    	bool switch_start;
    	bool switch_end;
    	bool disp_connectors_mapping;
    	bool disp_detetion_ports;
    };
    
    struct amdgpu_atpx {
    	acpi_handle handle;
    	struct amdgpu_atpx_functions functions;
    	bool is_hybrid;
    	bool dgpu_req_power_for_displays;
    };
    
    static struct amdgpu_atpx_priv {
    	bool atpx_detected;
    	bool bridge_pm_usable;
    	unsigned int quirks;
    	/* handle for device - and atpx */
    	acpi_handle dhandle;
    	acpi_handle other_handle;
    	struct amdgpu_atpx atpx;
    } amdgpu_atpx_priv;
    
    struct atpx_verify_interface {
    	u16 size;		/* structure size in bytes (includes size field) */
    	u16 version;		/* version */
    	u32 function_bits;	/* supported functions bit vector */
    } __packed;
    
    struct atpx_px_params {
    	u16 size;		/* structure size in bytes (includes size field) */
    	u32 valid_flags;	/* which flags are valid */
    	u32 flags;		/* flags */
    } __packed;
    
    struct atpx_power_control {
    	u16 size;
    	u8 dgpu_state;
    } __packed;