mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-20 22:36:24 +00:00
intel_sprite_on: Idententation + Copyright fix
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
This commit is contained in:
parent
209ab470f2
commit
5b5a7a806f
@ -1,8 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012 Corporation
|
* Copyright © 2012 Intel Corporation
|
||||||
*
|
|
||||||
* Author:
|
|
||||||
* Armin Reese <armin.c.reese@intel.com>
|
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@ -11,16 +8,21 @@
|
|||||||
* and/or sell copies of the Software, and to permit persons to whom the
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
* Software is furnished to do so, subject to the following conditions:
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in
|
* The above copyright notice and this permission notice (including the next
|
||||||
* all copies or substantial portions of the Software.
|
* paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
* Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
* IN THE SOFTWARE.
|
* IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Author:
|
||||||
|
* Armin Reese <armin.c.reese@intel.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -58,14 +60,14 @@ struct type_name
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define type_name_fn(res) \
|
#define type_name_fn(res) \
|
||||||
static const char * res##_str(int type) { \
|
static const char * res##_str(int type) { \
|
||||||
unsigned int i; \
|
unsigned int i; \
|
||||||
for (i = 0; i < ARRAY_SIZE(res##_names); i++) { \
|
for (i = 0; i < ARRAY_SIZE(res##_names); i++) { \
|
||||||
if (res##_names[i].type == type) \
|
if (res##_names[i].type == type) \
|
||||||
return res##_names[i].name; \
|
return res##_names[i].name; \
|
||||||
} \
|
} \
|
||||||
return "(invalid)"; \
|
return "(invalid)"; \
|
||||||
}
|
}
|
||||||
|
|
||||||
struct type_name encoder_type_names[] = {
|
struct type_name encoder_type_names[] = {
|
||||||
{ DRM_MODE_ENCODER_NONE, "none" },
|
{ DRM_MODE_ENCODER_NONE, "none" },
|
||||||
@ -77,15 +79,15 @@ struct type_name encoder_type_names[] = {
|
|||||||
|
|
||||||
type_name_fn(encoder_type)
|
type_name_fn(encoder_type)
|
||||||
|
|
||||||
struct type_name connector_status_names[] = {
|
struct type_name connector_status_names[] = {
|
||||||
{ DRM_MODE_CONNECTED, "connected" },
|
{ DRM_MODE_CONNECTED, "connected" },
|
||||||
{ DRM_MODE_DISCONNECTED, "disconnected" },
|
{ DRM_MODE_DISCONNECTED, "disconnected" },
|
||||||
{ DRM_MODE_UNKNOWNCONNECTION, "unknown" },
|
{ DRM_MODE_UNKNOWNCONNECTION, "unknown" },
|
||||||
};
|
};
|
||||||
|
|
||||||
type_name_fn(connector_status)
|
type_name_fn(connector_status)
|
||||||
|
|
||||||
struct type_name connector_type_names[] = {
|
struct type_name connector_type_names[] = {
|
||||||
{ DRM_MODE_CONNECTOR_Unknown, "unknown" },
|
{ DRM_MODE_CONNECTOR_Unknown, "unknown" },
|
||||||
{ DRM_MODE_CONNECTOR_VGA, "VGA" },
|
{ DRM_MODE_CONNECTOR_VGA, "VGA" },
|
||||||
{ DRM_MODE_CONNECTOR_DVII, "DVI-I" },
|
{ DRM_MODE_CONNECTOR_DVII, "DVI-I" },
|
||||||
@ -101,18 +103,18 @@ struct type_name connector_type_names[] = {
|
|||||||
{ DRM_MODE_CONNECTOR_HDMIB, "HDMI-B" },
|
{ DRM_MODE_CONNECTOR_HDMIB, "HDMI-B" },
|
||||||
{ DRM_MODE_CONNECTOR_TV, "TV" },
|
{ DRM_MODE_CONNECTOR_TV, "TV" },
|
||||||
{ DRM_MODE_CONNECTOR_eDP, "Embedded DisplayPort" },
|
{ DRM_MODE_CONNECTOR_eDP, "Embedded DisplayPort" },
|
||||||
};
|
};
|
||||||
|
|
||||||
type_name_fn(connector_type)
|
type_name_fn(connector_type)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mode setting with the kernel interfaces is a bit of a chore.
|
* Mode setting with the kernel interfaces is a bit of a chore.
|
||||||
* First you have to find the connector in question and make sure the
|
* First you have to find the connector in question and make sure the
|
||||||
* requested mode is available.
|
* requested mode is available.
|
||||||
* Then you need to find the encoder attached to that connector so you
|
* Then you need to find the encoder attached to that connector so you
|
||||||
* can bind it with a free crtc.
|
* can bind it with a free crtc.
|
||||||
*/
|
*/
|
||||||
struct connector
|
struct connector
|
||||||
{
|
{
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
int mode_valid;
|
int mode_valid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user