gallium: replace drm_driver_descriptor::configuration with driconf_xml
PIPE_CAPs are better. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
8ae50e6004
commit
d8b296d3ad
|
@ -87,25 +87,15 @@ pipe_loader_base_release(struct pipe_loader_device **dev)
|
||||||
*dev = NULL;
|
*dev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct drm_conf_ret *
|
|
||||||
pipe_loader_configuration(struct pipe_loader_device *dev,
|
|
||||||
enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return dev->ops->configuration(dev, conf);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
pipe_loader_load_options(struct pipe_loader_device *dev)
|
pipe_loader_load_options(struct pipe_loader_device *dev)
|
||||||
{
|
{
|
||||||
if (dev->option_info.info)
|
if (dev->option_info.info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const char *xml_options = gallium_driinfo_xml;
|
const char *xml_options = dev->ops->get_driconf_xml(dev);
|
||||||
const struct drm_conf_ret *xml_options_conf =
|
if (!xml_options)
|
||||||
pipe_loader_configuration(dev, DRM_CONF_XML_OPTIONS);
|
xml_options = gallium_driinfo_xml;
|
||||||
|
|
||||||
if (xml_options_conf)
|
|
||||||
xml_options = xml_options_conf->val.val_pointer;
|
|
||||||
|
|
||||||
driParseOptionInfo(&dev->option_info, xml_options);
|
driParseOptionInfo(&dev->option_info, xml_options);
|
||||||
driParseConfigFiles(&dev->option_cache, &dev->option_info, 0,
|
driParseConfigFiles(&dev->option_cache, &dev->option_info, 0,
|
||||||
|
|
|
@ -90,16 +90,6 @@ pipe_loader_probe(struct pipe_loader_device **devs, int ndev);
|
||||||
struct pipe_screen *
|
struct pipe_screen *
|
||||||
pipe_loader_create_screen(struct pipe_loader_device *dev);
|
pipe_loader_create_screen(struct pipe_loader_device *dev);
|
||||||
|
|
||||||
/**
|
|
||||||
* Query the configuration parameters for the specified device.
|
|
||||||
*
|
|
||||||
* \param dev Device that will be queried.
|
|
||||||
* \param conf The drm_conf id of the option to be queried.
|
|
||||||
*/
|
|
||||||
const struct drm_conf_ret *
|
|
||||||
pipe_loader_configuration(struct pipe_loader_device *dev,
|
|
||||||
enum drm_conf conf);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure that dev->option_cache is initialized appropriately for the driver.
|
* Ensure that dev->option_cache is initialized appropriately for the driver.
|
||||||
*
|
*
|
||||||
|
|
|
@ -69,89 +69,74 @@ static const struct drm_driver_descriptor driver_descriptors[] = {
|
||||||
{
|
{
|
||||||
.driver_name = "i915",
|
.driver_name = "i915",
|
||||||
.create_screen = pipe_i915_create_screen,
|
.create_screen = pipe_i915_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "iris",
|
.driver_name = "iris",
|
||||||
.create_screen = pipe_iris_create_screen,
|
.create_screen = pipe_iris_create_screen,
|
||||||
.configuration = pipe_iris_configuration_query,
|
.driconf_xml = &iris_driconf_xml,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "nouveau",
|
.driver_name = "nouveau",
|
||||||
.create_screen = pipe_nouveau_create_screen,
|
.create_screen = pipe_nouveau_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "r300",
|
.driver_name = "r300",
|
||||||
.create_screen = pipe_r300_create_screen,
|
.create_screen = pipe_r300_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "r600",
|
.driver_name = "r600",
|
||||||
.create_screen = pipe_r600_create_screen,
|
.create_screen = pipe_r600_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "radeonsi",
|
.driver_name = "radeonsi",
|
||||||
.create_screen = pipe_radeonsi_create_screen,
|
.create_screen = pipe_radeonsi_create_screen,
|
||||||
.configuration = pipe_radeonsi_configuration_query,
|
.driconf_xml = &radeonsi_driconf_xml,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "vmwgfx",
|
.driver_name = "vmwgfx",
|
||||||
.create_screen = pipe_vmwgfx_create_screen,
|
.create_screen = pipe_vmwgfx_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "kgsl",
|
.driver_name = "kgsl",
|
||||||
.create_screen = pipe_freedreno_create_screen,
|
.create_screen = pipe_freedreno_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "msm",
|
.driver_name = "msm",
|
||||||
.create_screen = pipe_freedreno_create_screen,
|
.create_screen = pipe_freedreno_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "virtio_gpu",
|
.driver_name = "virtio_gpu",
|
||||||
.create_screen = pipe_virgl_create_screen,
|
.create_screen = pipe_virgl_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "v3d",
|
.driver_name = "v3d",
|
||||||
.create_screen = pipe_v3d_create_screen,
|
.create_screen = pipe_v3d_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "vc4",
|
.driver_name = "vc4",
|
||||||
.create_screen = pipe_vc4_create_screen,
|
.create_screen = pipe_vc4_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "panfrost",
|
.driver_name = "panfrost",
|
||||||
.create_screen = pipe_panfrost_create_screen,
|
.create_screen = pipe_panfrost_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "etnaviv",
|
.driver_name = "etnaviv",
|
||||||
.create_screen = pipe_etna_create_screen,
|
.create_screen = pipe_etna_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "tegra",
|
.driver_name = "tegra",
|
||||||
.create_screen = pipe_tegra_create_screen,
|
.create_screen = pipe_tegra_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.driver_name = "lima",
|
.driver_name = "lima",
|
||||||
.create_screen = pipe_lima_create_screen,
|
.create_screen = pipe_lima_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct drm_driver_descriptor default_driver_descriptor = {
|
static const struct drm_driver_descriptor default_driver_descriptor = {
|
||||||
.driver_name = "kmsro",
|
.driver_name = "kmsro",
|
||||||
.create_screen = pipe_kmsro_create_screen,
|
.create_screen = pipe_kmsro_create_screen,
|
||||||
.configuration = pipe_default_configuration_query,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -296,16 +281,15 @@ pipe_loader_drm_release(struct pipe_loader_device **dev)
|
||||||
pipe_loader_base_release(dev);
|
pipe_loader_base_release(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *
|
static const char *
|
||||||
pipe_loader_drm_configuration(struct pipe_loader_device *dev,
|
pipe_loader_drm_get_driconf_xml(struct pipe_loader_device *dev)
|
||||||
enum drm_conf conf)
|
|
||||||
{
|
{
|
||||||
struct pipe_loader_drm_device *ddev = pipe_loader_drm_device(dev);
|
struct pipe_loader_drm_device *ddev = pipe_loader_drm_device(dev);
|
||||||
|
|
||||||
if (!ddev->dd->configuration)
|
if (!ddev->dd->driconf_xml)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return ddev->dd->configuration(conf);
|
return *ddev->dd->driconf_xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pipe_screen *
|
static struct pipe_screen *
|
||||||
|
@ -324,16 +308,10 @@ pipe_loader_drm_get_driinfo_xml(const char *driver_name)
|
||||||
struct util_dl_library *lib = NULL;
|
struct util_dl_library *lib = NULL;
|
||||||
const struct drm_driver_descriptor *dd =
|
const struct drm_driver_descriptor *dd =
|
||||||
get_driver_descriptor(driver_name, &lib);
|
get_driver_descriptor(driver_name, &lib);
|
||||||
if (!dd)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
const struct drm_conf_ret *conf = dd->configuration(DRM_CONF_XML_OPTIONS);
|
if (dd && dd->driconf_xml)
|
||||||
if (!conf)
|
xml = strdup(*dd->driconf_xml);
|
||||||
goto out;
|
|
||||||
|
|
||||||
xml = strdup((const char *)conf->val.val_pointer);
|
|
||||||
|
|
||||||
out:
|
|
||||||
if (lib)
|
if (lib)
|
||||||
util_dl_close(lib);
|
util_dl_close(lib);
|
||||||
return xml;
|
return xml;
|
||||||
|
@ -341,6 +319,6 @@ out:
|
||||||
|
|
||||||
static const struct pipe_loader_ops pipe_loader_drm_ops = {
|
static const struct pipe_loader_ops pipe_loader_drm_ops = {
|
||||||
.create_screen = pipe_loader_drm_create_screen,
|
.create_screen = pipe_loader_drm_create_screen,
|
||||||
.configuration = pipe_loader_drm_configuration,
|
.get_driconf_xml = pipe_loader_drm_get_driconf_xml,
|
||||||
.release = pipe_loader_drm_release
|
.release = pipe_loader_drm_release
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,8 +34,7 @@ struct pipe_loader_ops {
|
||||||
struct pipe_screen *(*create_screen)(struct pipe_loader_device *dev,
|
struct pipe_screen *(*create_screen)(struct pipe_loader_device *dev,
|
||||||
const struct pipe_screen_config *config);
|
const struct pipe_screen_config *config);
|
||||||
|
|
||||||
const struct drm_conf_ret *(*configuration)(struct pipe_loader_device *dev,
|
const char *(*get_driconf_xml)(struct pipe_loader_device *dev);
|
||||||
enum drm_conf conf);
|
|
||||||
|
|
||||||
void (*release)(struct pipe_loader_device **dev);
|
void (*release)(struct pipe_loader_device **dev);
|
||||||
};
|
};
|
||||||
|
|
|
@ -293,9 +293,8 @@ pipe_loader_sw_release(struct pipe_loader_device **dev)
|
||||||
pipe_loader_base_release(dev);
|
pipe_loader_base_release(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *
|
static const char *
|
||||||
pipe_loader_sw_configuration(struct pipe_loader_device *dev,
|
pipe_loader_sw_get_driconf_xml(struct pipe_loader_device *dev)
|
||||||
enum drm_conf conf)
|
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -316,6 +315,6 @@ pipe_loader_sw_create_screen(struct pipe_loader_device *dev,
|
||||||
|
|
||||||
static const struct pipe_loader_ops pipe_loader_sw_ops = {
|
static const struct pipe_loader_ops pipe_loader_sw_ops = {
|
||||||
.create_screen = pipe_loader_sw_create_screen,
|
.create_screen = pipe_loader_sw_create_screen,
|
||||||
.configuration = pipe_loader_sw_configuration,
|
.get_driconf_xml = pipe_loader_sw_get_driconf_xml,
|
||||||
.release = pipe_loader_sw_release
|
.release = pipe_loader_sw_release
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,12 +7,6 @@
|
||||||
#include "state_tracker/drm_driver.h"
|
#include "state_tracker/drm_driver.h"
|
||||||
#include "util/xmlpool.h"
|
#include "util/xmlpool.h"
|
||||||
|
|
||||||
const struct drm_conf_ret *
|
|
||||||
pipe_default_configuration_query(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef GALLIUM_I915
|
#ifdef GALLIUM_I915
|
||||||
#include "i915/drm/i915_drm_public.h"
|
#include "i915/drm/i915_drm_public.h"
|
||||||
#include "i915/i915_public.h"
|
#include "i915/i915_public.h"
|
||||||
|
@ -54,23 +48,9 @@ pipe_iris_create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return screen ? debug_screen_wrap(screen) : NULL;
|
return screen ? debug_screen_wrap(screen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct drm_conf_ret *
|
const char *iris_driconf_xml =
|
||||||
pipe_iris_configuration_query(enum drm_conf conf)
|
#include "iris/iris_driinfo.h"
|
||||||
{
|
;
|
||||||
static const struct drm_conf_ret xml_options_ret = {
|
|
||||||
.type = DRM_CONF_POINTER,
|
|
||||||
.val.val_pointer =
|
|
||||||
#include "iris/iris_driinfo.h"
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (conf) {
|
|
||||||
case DRM_CONF_XML_OPTIONS:
|
|
||||||
return &xml_options_ret;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return pipe_default_configuration_query(conf);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -81,11 +61,7 @@ pipe_iris_create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct drm_conf_ret *
|
const char *iris_driconf_xml = NULL;
|
||||||
pipe_iris_configuration_query(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -204,23 +180,9 @@ pipe_radeonsi_create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return rw ? debug_screen_wrap(rw->screen) : NULL;
|
return rw ? debug_screen_wrap(rw->screen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct drm_conf_ret *
|
const char *radeonsi_driconf_xml =
|
||||||
pipe_radeonsi_configuration_query(enum drm_conf conf)
|
#include "radeonsi/si_driinfo.h"
|
||||||
{
|
;
|
||||||
static const struct drm_conf_ret xml_options_ret = {
|
|
||||||
.type = DRM_CONF_POINTER,
|
|
||||||
.val.val_pointer =
|
|
||||||
#include "radeonsi/si_driinfo.h"
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (conf) {
|
|
||||||
case DRM_CONF_XML_OPTIONS:
|
|
||||||
return &xml_options_ret;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return pipe_default_configuration_query(conf);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -231,11 +193,7 @@ pipe_radeonsi_create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct drm_conf_ret *
|
const char *radeonsi_driconf_xml = NULL;
|
||||||
pipe_radeonsi_configuration_query(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
#ifndef _DRM_HELPER_PUBLIC_H
|
#ifndef _DRM_HELPER_PUBLIC_H
|
||||||
#define _DRM_HELPER_PUBLIC_H
|
#define _DRM_HELPER_PUBLIC_H
|
||||||
|
|
||||||
enum drm_conf;
|
|
||||||
struct drm_conf_ret;
|
|
||||||
|
|
||||||
struct pipe_screen;
|
struct pipe_screen;
|
||||||
struct pipe_screen_config;
|
struct pipe_screen_config;
|
||||||
|
|
||||||
|
const char *iris_driconf_xml;
|
||||||
|
const char *radeonsi_driconf_xml;
|
||||||
|
|
||||||
struct pipe_screen *
|
struct pipe_screen *
|
||||||
pipe_i915_create_screen(int fd, const struct pipe_screen_config *config);
|
pipe_i915_create_screen(int fd, const struct pipe_screen_config *config);
|
||||||
|
|
||||||
struct pipe_screen *
|
struct pipe_screen *
|
||||||
pipe_iris_create_screen(int fd, const struct pipe_screen_config *config);
|
pipe_iris_create_screen(int fd, const struct pipe_screen_config *config);
|
||||||
const struct drm_conf_ret *
|
|
||||||
pipe_iris_configuration_query(enum drm_conf conf);
|
|
||||||
|
|
||||||
struct pipe_screen *
|
struct pipe_screen *
|
||||||
pipe_nouveau_create_screen(int fd, const struct pipe_screen_config *config);
|
pipe_nouveau_create_screen(int fd, const struct pipe_screen_config *config);
|
||||||
|
@ -26,8 +24,6 @@ pipe_r600_create_screen(int fd, const struct pipe_screen_config *config);
|
||||||
|
|
||||||
struct pipe_screen *
|
struct pipe_screen *
|
||||||
pipe_radeonsi_create_screen(int fd, const struct pipe_screen_config *config);
|
pipe_radeonsi_create_screen(int fd, const struct pipe_screen_config *config);
|
||||||
const struct drm_conf_ret *
|
|
||||||
pipe_radeonsi_configuration_query(enum drm_conf conf);
|
|
||||||
|
|
||||||
struct pipe_screen *
|
struct pipe_screen *
|
||||||
pipe_vmwgfx_create_screen(int fd, const struct pipe_screen_config *config);
|
pipe_vmwgfx_create_screen(int fd, const struct pipe_screen_config *config);
|
||||||
|
@ -62,7 +58,4 @@ pipe_tegra_create_screen(int fd, const struct pipe_screen_config *config);
|
||||||
struct pipe_screen *
|
struct pipe_screen *
|
||||||
pipe_lima_create_screen(int fd, const struct pipe_screen_config *config);
|
pipe_lima_create_screen(int fd, const struct pipe_screen_config *config);
|
||||||
|
|
||||||
const struct drm_conf_ret *
|
|
||||||
pipe_default_configuration_query(enum drm_conf conf);
|
|
||||||
|
|
||||||
#endif /* _DRM_HELPER_PUBLIC_H */
|
#endif /* _DRM_HELPER_PUBLIC_H */
|
||||||
|
|
|
@ -11,32 +11,6 @@ struct pipe_screen_config;
|
||||||
struct pipe_context;
|
struct pipe_context;
|
||||||
struct pipe_resource;
|
struct pipe_resource;
|
||||||
|
|
||||||
/**
|
|
||||||
* Configuration queries.
|
|
||||||
*/
|
|
||||||
enum drm_conf {
|
|
||||||
/* XML string describing the available config options. */
|
|
||||||
DRM_CONF_XML_OPTIONS, /* DRM_CONF_POINTER */
|
|
||||||
DRM_CONF_MAX
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Type of configuration answer
|
|
||||||
*/
|
|
||||||
enum drm_conf_type {
|
|
||||||
DRM_CONF_POINTER
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return value from the configuration function.
|
|
||||||
*/
|
|
||||||
struct drm_conf_ret {
|
|
||||||
enum drm_conf_type type;
|
|
||||||
union {
|
|
||||||
void *val_pointer;
|
|
||||||
} val;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct drm_driver_descriptor
|
struct drm_driver_descriptor
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -44,6 +18,12 @@ struct drm_driver_descriptor
|
||||||
*/
|
*/
|
||||||
const char *driver_name;
|
const char *driver_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pointer to the XML string describing driver-specific driconf options.
|
||||||
|
* Use DRI_CONF_* macros to create the string.
|
||||||
|
*/
|
||||||
|
const char **driconf_xml;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a pipe srcreen.
|
* Create a pipe srcreen.
|
||||||
*
|
*
|
||||||
|
@ -52,15 +32,6 @@ struct drm_driver_descriptor
|
||||||
*/
|
*/
|
||||||
struct pipe_screen* (*create_screen)(int drm_fd,
|
struct pipe_screen* (*create_screen)(int drm_fd,
|
||||||
const struct pipe_screen_config *config);
|
const struct pipe_screen_config *config);
|
||||||
|
|
||||||
/**
|
|
||||||
* Return a configuration value.
|
|
||||||
*
|
|
||||||
* If this function is NULL, or if it returns NULL
|
|
||||||
* the state tracker- or state
|
|
||||||
* tracker manager should provide a reasonable default value.
|
|
||||||
*/
|
|
||||||
const struct drm_conf_ret *(*configuration) (enum drm_conf conf);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const struct drm_driver_descriptor driver_descriptor;
|
extern const struct drm_driver_descriptor driver_descriptor;
|
||||||
|
@ -68,11 +39,11 @@ extern const struct drm_driver_descriptor driver_descriptor;
|
||||||
/**
|
/**
|
||||||
* Instantiate a drm_driver_descriptor struct.
|
* Instantiate a drm_driver_descriptor struct.
|
||||||
*/
|
*/
|
||||||
#define DRM_DRIVER_DESCRIPTOR(driver_name_str, func, conf) \
|
#define DRM_DRIVER_DESCRIPTOR(driver_name_str, driconf, func) \
|
||||||
const struct drm_driver_descriptor driver_descriptor = { \
|
const struct drm_driver_descriptor driver_descriptor = { \
|
||||||
.driver_name = driver_name_str, \
|
.driver_name = driver_name_str, \
|
||||||
|
.driconf_xml = driconf, \
|
||||||
.create_screen = func, \
|
.create_screen = func, \
|
||||||
.configuration = (conf), \
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,10 +23,5 @@ create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return screen;
|
return screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
DRM_DRIVER_DESCRIPTOR("i915", create_screen, drm_configuration)
|
DRM_DRIVER_DESCRIPTOR("i915", NULL, create_screen)
|
||||||
|
|
|
@ -17,10 +17,5 @@ create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return screen;
|
return screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
DRM_DRIVER_DESCRIPTOR("msm", create_screen, drm_configuration)
|
DRM_DRIVER_DESCRIPTOR("msm", NULL, create_screen)
|
||||||
|
|
|
@ -17,10 +17,5 @@ create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return screen;
|
return screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
DRM_DRIVER_DESCRIPTOR("nouveau", create_screen, drm_configuration)
|
DRM_DRIVER_DESCRIPTOR("nouveau", NULL, create_screen)
|
||||||
|
|
|
@ -13,10 +13,5 @@ create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return sws ? debug_screen_wrap(sws->screen) : NULL;
|
return sws ? debug_screen_wrap(sws->screen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
DRM_DRIVER_DESCRIPTOR("r300", create_screen, drm_configuration)
|
DRM_DRIVER_DESCRIPTOR("r300", NULL, create_screen)
|
||||||
|
|
|
@ -13,10 +13,5 @@ create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return rw ? debug_screen_wrap(rw->screen) : NULL;
|
return rw ? debug_screen_wrap(rw->screen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
DRM_DRIVER_DESCRIPTOR("r600", create_screen, drm_configuration)
|
DRM_DRIVER_DESCRIPTOR("r600", NULL, create_screen)
|
||||||
|
|
|
@ -20,22 +20,9 @@ create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return rw ? debug_screen_wrap(rw->screen) : NULL;
|
return rw ? debug_screen_wrap(rw->screen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
|
static const char *driconf_xml =
|
||||||
{
|
#include "radeonsi/si_driinfo.h"
|
||||||
static const struct drm_conf_ret xml_options_ret = {
|
;
|
||||||
.type = DRM_CONF_POINTER,
|
|
||||||
.val.val_pointer =
|
|
||||||
#include "radeonsi/si_driinfo.h"
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (conf) {
|
|
||||||
case DRM_CONF_XML_OPTIONS:
|
|
||||||
return &xml_options_ret;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
DRM_DRIVER_DESCRIPTOR("radeonsi", create_screen, drm_configuration)
|
DRM_DRIVER_DESCRIPTOR("radeonsi", &driconf_xml, create_screen)
|
||||||
|
|
|
@ -23,10 +23,5 @@ create_screen(int fd, const struct pipe_screen_config *config)
|
||||||
return screen;
|
return screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
DRM_DRIVER_DESCRIPTOR("vmwgfx", create_screen, drm_configuration)
|
DRM_DRIVER_DESCRIPTOR("vmwgfx", NULL, create_screen)
|
||||||
|
|
Loading…
Reference in New Issue