* add *very* preliminary dpms support
we will need to query the card dpms state for each monitor at a later date git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42829 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -146,6 +146,9 @@ init_common(int device, bool isClone)
|
||||
gInfo->is_clone = isClone;
|
||||
gInfo->device = device;
|
||||
|
||||
gInfo->dpms_mode = B_DPMS_ON;
|
||||
// initial state
|
||||
|
||||
// get basic info from driver
|
||||
|
||||
radeon_get_private_data data;
|
||||
|
||||
@@ -56,6 +56,8 @@ struct accelerant_info {
|
||||
|
||||
gpu_mc_info *mc_info; // used for last known mc state
|
||||
|
||||
volatile uint32 dpms_mode; // current driver dpms mode
|
||||
|
||||
// LVDS panel mode passed from the bios/startup.
|
||||
display_mode lvds_panel_mode;
|
||||
};
|
||||
|
||||
@@ -35,12 +35,10 @@ get_accelerant_hook(uint32 feature, void *data)
|
||||
*/
|
||||
|
||||
/* DPMS */
|
||||
/*
|
||||
case B_DPMS_CAPABILITIES:
|
||||
return (void*)radeon_dpms_capabilities;
|
||||
case B_DPMS_MODE:
|
||||
return (void*)radeon_dpms_mode;
|
||||
*/
|
||||
case B_SET_DPMS_MODE:
|
||||
return (void*)radeon_dpms_set;
|
||||
|
||||
|
||||
@@ -97,6 +97,23 @@ radeon_get_edid_info(void* info, size_t size, uint32* edid_version)
|
||||
}
|
||||
|
||||
|
||||
uint32
|
||||
radeon_dpms_capabilities(void)
|
||||
{
|
||||
// These should be pretty universally supported on Radeon HD cards
|
||||
return B_DPMS_ON | B_DPMS_STAND_BY | B_DPMS_SUSPEND | B_DPMS_OFF;
|
||||
}
|
||||
|
||||
|
||||
uint32
|
||||
radeon_dpms_mode(void)
|
||||
{
|
||||
// TODO : this really isn't a good long-term solution
|
||||
// we may need to look at the encoder dpms scratch registers
|
||||
return gInfo->dpms_mode;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
radeon_dpms_set(int mode)
|
||||
{
|
||||
@@ -128,6 +145,7 @@ radeon_dpms_set(int mode)
|
||||
}
|
||||
break;
|
||||
}
|
||||
gInfo->dpms_mode = mode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
status_t create_mode_list(void);
|
||||
bool is_mode_supported(display_mode* mode);
|
||||
status_t is_mode_sane(display_mode *mode);
|
||||
uint32 radeon_dpms_capabilities(void);
|
||||
uint32 radeon_dpms_mode(void);
|
||||
void radeon_dpms_set(int mode);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user