/*
*/
/*
*
* Copyright 2008, 2013, (c) Intel Corporation
* Jesse Barnes <jbarnes@virtuousgeek.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next 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 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* ANY CLAIM, DAMAGES OR OTHER 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 IN THE SOFTWARE.
*/
#include "drmP.h"
#include "drm.h"
#include "i915_drm.h"
#include "intel_drv.h"
#include "i915_reg.h"
{
return I915_READ8(data_port);
}
{
return I915_READ8(VGA_AR_DATA_READ);
}
{
}
static void i915_write_indexed(struct drm_device *dev, u16 index_port, u16 data_port, u8 reg, u8 val)
{
}
{
int i;
/* VGA state */
/* VGA color palette registers */
/* MSR bits */
st01 = VGA_ST01_CGA;
} else {
st01 = VGA_ST01_MDA;
}
/* CRT controller regs */
(~0x80));
for (i = 0; i <= 0x24; i++)
/* Make sure we don't turn off CR group 0 writes */
/* Attribute controller registers */
for (i = 0; i <= 0x14; i++)
/* Graphics controller registers */
for (i = 0; i < 9; i++)
/* Sequencer registers */
for (i = 0; i < 8; i++)
}
{
int i;
/* VGA state */
udelay(150);
/* MSR bits */
st01 = VGA_ST01_CGA;
} else {
st01 = VGA_ST01_MDA;
}
/* Sequencer registers, don't write SR07 */
for (i = 0; i < 7; i++)
/* CRT controller regs */
/* Enable CR group 0 writes */
for (i = 0; i <= 0x24; i++)
/* Graphics controller regs */
for (i = 0; i < 9; i++)
/* Attribute controller registers */
for (i = 0; i <= 0x14; i++)
/* VGA color palette registers */
}
{
unsigned long flags;
/* Display arbitration control */
/* This is only meaningful in non-KMS mode */
/* Don't regfile.save them in KMS mode */
/* LVDS state */
if (HAS_PCH_SPLIT(dev)) {
} else {
}
if (HAS_PCH_SPLIT(dev)) {
} else {
}
/* Only regfile.save FBC state on the platform that supports FBC */
if (I915_HAS_FBC(dev)) {
if (HAS_PCH_SPLIT(dev)) {
} else {
}
}
}
{
unsigned long flags;
/* Display arbitration */
/* LVDS state */
mask = ~LVDS_PORT_EN;
if (HAS_PCH_SPLIT(dev)) {
/* NOTE: BLC_PWM_CPU_CTL must be written after BLC_PWM_CPU_CTL2;
* otherwise we get blank eDP screen after S3 on some machines
*/
} else {
}
/* only restore FBC info on the platform that supports FBC*/
if (I915_HAS_FBC(dev)) {
if (HAS_PCH_SPLIT(dev)) {
} else {
}
}
else
}
{
int i;
/* Interrupt state */
if (HAS_PCH_SPLIT(dev)) {
} else {
}
}
/* Cache mode state */
/* Memory Arbitration state */
/* Scratch space */
for (i = 0; i < 16; i++) {
}
for (i = 0; i < 3; i++)
return 0;
}
{
int i;
/* Interrupt state */
if (HAS_PCH_SPLIT(dev)) {
} else {
}
}
/* Cache mode state */
/* Memory arbitration state */
for (i = 0; i < 16; i++) {
}
for (i = 0; i < 3; i++)
return 0;
}