gfx: Move drivers/generic/gfx to drivers/gfx/generic
This change creates gfx directory under drivers/ so that all drivers handling gfx devices can be located in the same place. In follow-up CLs, we will be adding another driver that handles gfx devices. This change also updates the names used within the driver from *generic_gfx* to *gfx_generic*. In addition to that, mainboard drallion using this driver is updated to match the correct path and Kconfig name. TEST=Verified that drallion still builds. Change-Id: I377743e0f6d770eed143c7b6041dab2a101e6252 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39047 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Mathew King <mathewk@chromium.org>
This commit is contained in:
parent
4684dc0c63
commit
a0b0d42d69
|
@ -1 +0,0 @@
|
|||
ramstage-$(CONFIG_DRIVERS_GENERIC_GFX) += gfx.c
|
|
@ -1,4 +1,4 @@
|
|||
config DRIVERS_GENERIC_GFX
|
||||
config DRIVERS_GFX_GENERIC
|
||||
bool
|
||||
default n
|
||||
depends on HAVE_ACPI_TABLES
|
|
@ -0,0 +1 @@
|
|||
ramstage-$(CONFIG_DRIVERS_GFX_GENERIC) += generic.c
|
|
@ -13,11 +13,11 @@
|
|||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __DRIVERS_GENERIC_GFX_CHIP_H__
|
||||
#define __DRIVERS_GENERIC_GFX_CHIP_H__
|
||||
#ifndef __DRIVERS_GFX_GENERIC_CHIP_H__
|
||||
#define __DRIVERS_GFX_GENERIC_CHIP_H__
|
||||
|
||||
/* Config for electronic privacy screen */
|
||||
struct drivers_generic_gfx_privacy_screen_config {
|
||||
struct drivers_gfx_generic_privacy_screen_config {
|
||||
/* Is privacy screen available on this graphics device */
|
||||
int enabled;
|
||||
/* ACPI namespace path to privacy screen detection function */
|
||||
|
@ -31,17 +31,17 @@ struct drivers_generic_gfx_privacy_screen_config {
|
|||
};
|
||||
|
||||
/* Config for an output device as defined in section A.5 of the ACPI spec */
|
||||
struct drivers_generic_gfx_device_config {
|
||||
struct drivers_gfx_generic_device_config {
|
||||
/* ACPI device name of the output device */
|
||||
const char *name;
|
||||
/* The address of the output device. See section A.3.2 */
|
||||
unsigned int addr;
|
||||
/* Electronic privacy screen specific config */
|
||||
struct drivers_generic_gfx_privacy_screen_config privacy;
|
||||
struct drivers_gfx_generic_privacy_screen_config privacy;
|
||||
};
|
||||
|
||||
/* Config for an ACPI video device defined in Appendix A of the ACPI spec */
|
||||
struct drivers_generic_gfx_config {
|
||||
struct drivers_gfx_generic_config {
|
||||
/*
|
||||
* ACPI device name of the graphics card, "GFX0" will be used if name is
|
||||
* not set
|
||||
|
@ -50,7 +50,7 @@ struct drivers_generic_gfx_config {
|
|||
/* The number of output devices defined */
|
||||
int device_count;
|
||||
/* Config for output devices */
|
||||
struct drivers_generic_gfx_device_config device[5];
|
||||
struct drivers_gfx_generic_device_config device[5];
|
||||
};
|
||||
|
||||
#endif /* __DRIVERS_GENERIC_GFX_CHIP_H__ */
|
||||
#endif /* __DRIVERS_GFX_GENERIC_CHIP_H__ */
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
static void privacy_screen_detect_cb(void *arg)
|
||||
{
|
||||
struct drivers_generic_gfx_privacy_screen_config *config = arg;
|
||||
struct drivers_gfx_generic_privacy_screen_config *config = arg;
|
||||
|
||||
acpigen_write_store();
|
||||
acpigen_emit_namestring(config->detect_function);
|
||||
|
@ -37,20 +37,20 @@ static void privacy_screen_detect_cb(void *arg)
|
|||
}
|
||||
static void privacy_screen_get_status_cb(void *arg)
|
||||
{
|
||||
struct drivers_generic_gfx_privacy_screen_config *config = arg;
|
||||
struct drivers_gfx_generic_privacy_screen_config *config = arg;
|
||||
|
||||
acpigen_emit_byte(RETURN_OP);
|
||||
acpigen_emit_namestring(config->status_function);
|
||||
}
|
||||
static void privacy_screen_enable_cb(void *arg)
|
||||
{
|
||||
struct drivers_generic_gfx_privacy_screen_config *config = arg;
|
||||
struct drivers_gfx_generic_privacy_screen_config *config = arg;
|
||||
|
||||
acpigen_emit_namestring(config->enable_function);
|
||||
}
|
||||
static void privacy_screen_disable_cb(void *arg)
|
||||
{
|
||||
struct drivers_generic_gfx_privacy_screen_config *config = arg;
|
||||
struct drivers_gfx_generic_privacy_screen_config *config = arg;
|
||||
|
||||
acpigen_emit_namestring(config->disable_function);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ static void (*privacy_screen_callbacks[])(void *) = {
|
|||
static void gfx_fill_ssdt_generator(struct device *dev)
|
||||
{
|
||||
size_t i;
|
||||
struct drivers_generic_gfx_config *config = dev->chip_info;
|
||||
struct drivers_gfx_generic_config *config = dev->chip_info;
|
||||
|
||||
const char *scope = acpi_device_scope(dev);
|
||||
|
||||
|
@ -103,7 +103,7 @@ static void gfx_fill_ssdt_generator(struct device *dev)
|
|||
|
||||
static const char *gfx_acpi_name(const struct device *dev)
|
||||
{
|
||||
struct drivers_generic_gfx_config *config = dev->chip_info;
|
||||
struct drivers_gfx_generic_config *config = dev->chip_info;
|
||||
|
||||
return config->name ? : "GFX0";
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ static struct device_operations gfx_ops = {
|
|||
|
||||
static void gfx_enable(struct device *dev)
|
||||
{
|
||||
struct drivers_generic_gfx_config *config = dev->chip_info;
|
||||
struct drivers_gfx_generic_config *config = dev->chip_info;
|
||||
|
||||
if (!config)
|
||||
return;
|
||||
|
@ -123,7 +123,7 @@ static void gfx_enable(struct device *dev)
|
|||
dev->ops = &gfx_ops;
|
||||
}
|
||||
|
||||
struct chip_operations drivers_generic_gfx_ops = {
|
||||
CHIP_NAME("Graphics Device")
|
||||
struct chip_operations drivers_gfx_generic_ops = {
|
||||
CHIP_NAME("Generic Graphics Device")
|
||||
.enable_dev = gfx_enable
|
||||
};
|
|
@ -2,7 +2,7 @@
|
|||
config BOARD_GOOGLE_BASEBOARD_DRALLION
|
||||
def_bool n
|
||||
select BOARD_ROMSIZE_KB_32768
|
||||
select DRIVERS_GENERIC_GFX
|
||||
select DRIVERS_GFX_GENERIC
|
||||
select DRIVERS_I2C_GENERIC
|
||||
select DRIVERS_I2C_HID
|
||||
select DRIVERS_INTEL_ISH
|
||||
|
|
|
@ -226,7 +226,7 @@ chip soc/intel/cannonlake
|
|||
device domain 0 on
|
||||
device pci 00.0 on end # Host Bridge
|
||||
device pci 02.0 on
|
||||
chip drivers/generic/gfx
|
||||
chip drivers/gfx/generic
|
||||
register "device_count" = "1"
|
||||
register "device[0].name" = ""LCD""
|
||||
# Address is set following the ACPI spec section A.3.2
|
||||
|
|
Loading…
Reference in New Issue