Skip to content

Commit

Permalink
Merge branch 'drm-intel-next-fixes' into drm-intel-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-packard committed Jan 12, 2012
2 parents 1a464cb + 44306ab commit a190d70
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 138 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ static const char *cache_level_str(int type)
static void
describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
{
seq_printf(m, "%p: %s%s %8zd %04x %04x %d %d%s%s%s",
seq_printf(m, "%p: %s%s %8zdKiB %04x %04x %d %d%s%s%s",
&obj->base,
get_pin_flag(obj),
get_tiling_flag(obj),
obj->base.size,
obj->base.size / 1024,
obj->base.read_domains,
obj->base.write_domain,
obj->last_rendering_seqno,
Expand Down
7 changes: 6 additions & 1 deletion drivers/gpu/drm/i915/i915_suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,19 @@
#include "drm.h"
#include "i915_drm.h"
#include "intel_drv.h"
#include "i915_reg.h"

static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)
{
struct drm_i915_private *dev_priv = dev->dev_private;
u32 dpll_reg;

/* On IVB, 3rd pipe shares PLL with another one */
if (pipe > 1)
return false;

if (HAS_PCH_SPLIT(dev))
dpll_reg = (pipe == PIPE_A) ? _PCH_DPLL_A : _PCH_DPLL_B;
dpll_reg = PCH_DPLL(pipe);
else
dpll_reg = (pipe == PIPE_A) ? _DPLL_A : _DPLL_B;

Expand Down
23 changes: 23 additions & 0 deletions drivers/gpu/drm/i915/intel_crt.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Eric Anholt <[email protected]>
*/

#include <linux/dmi.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include "drmP.h"
Expand Down Expand Up @@ -540,13 +541,35 @@ static const struct drm_encoder_funcs intel_crt_enc_funcs = {
.destroy = intel_encoder_destroy,
};

static int __init intel_no_crt_dmi_callback(const struct dmi_system_id *id)
{
DRM_DEBUG_KMS("Skipping CRT initialization for %s\n", id->ident);
return 1;
}

static const struct dmi_system_id intel_no_crt[] = {
{
.callback = intel_no_crt_dmi_callback,
.ident = "ACER ZGB",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ACER"),
DMI_MATCH(DMI_PRODUCT_NAME, "ZGB"),
},
},
{ }
};

void intel_crt_init(struct drm_device *dev)
{
struct drm_connector *connector;
struct intel_crt *crt;
struct intel_connector *intel_connector;
struct drm_i915_private *dev_priv = dev->dev_private;

/* Skip machines without VGA that falsely report hotplug events */
if (dmi_check_system(intel_no_crt))
return;

crt = kzalloc(sizeof(struct intel_crt), GFP_KERNEL);
if (!crt)
return;
Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/i915/intel_lvds.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
},
},
{
.callback = intel_no_lvds_dmi_callback,
.ident = "Clientron E830",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Clientron"),
DMI_MATCH(DMI_PRODUCT_NAME, "E830"),
},
},
{
.callback = intel_no_lvds_dmi_callback,
.ident = "Asus EeeBox PC EB1007",
.matches = {
Expand Down
8 changes: 3 additions & 5 deletions drivers/gpu/drm/i915/intel_sdvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,15 +1066,13 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,

/* Set the SDVO control regs. */
if (INTEL_INFO(dev)->gen >= 4) {
sdvox = 0;
/* The real mode polarity is set by the SDVO commands, using
* struct intel_sdvo_dtd. */
sdvox = SDVO_VSYNC_ACTIVE_HIGH | SDVO_HSYNC_ACTIVE_HIGH;
if (intel_sdvo->is_hdmi)
sdvox |= intel_sdvo->color_range;
if (INTEL_INFO(dev)->gen < 5)
sdvox |= SDVO_BORDER_ENABLE;
if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
sdvox |= SDVO_VSYNC_ACTIVE_HIGH;
if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC)
sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
} else {
sdvox = I915_READ(intel_sdvo->sdvo_reg);
switch (intel_sdvo->sdvo_reg) {
Expand Down
138 changes: 8 additions & 130 deletions drivers/gpu/drm/i915/intel_tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static const struct tv_mode tv_modes[] = {
{
.name = "NTSC-M",
.clock = 108000,
.refresh = 29970,
.refresh = 59940,
.oversample = TV_OVERSAMPLE_8X,
.component_only = 0,
/* 525 Lines, 60 Fields, 15.734KHz line, Sub-Carrier 3.580MHz */
Expand Down Expand Up @@ -460,7 +460,7 @@ static const struct tv_mode tv_modes[] = {
{
.name = "NTSC-443",
.clock = 108000,
.refresh = 29970,
.refresh = 59940,
.oversample = TV_OVERSAMPLE_8X,
.component_only = 0,
/* 525 Lines, 60 Fields, 15.734KHz line, Sub-Carrier 4.43MHz */
Expand Down Expand Up @@ -502,7 +502,7 @@ static const struct tv_mode tv_modes[] = {
{
.name = "NTSC-J",
.clock = 108000,
.refresh = 29970,
.refresh = 59940,
.oversample = TV_OVERSAMPLE_8X,
.component_only = 0,

Expand Down Expand Up @@ -545,7 +545,7 @@ static const struct tv_mode tv_modes[] = {
{
.name = "PAL-M",
.clock = 108000,
.refresh = 29970,
.refresh = 59940,
.oversample = TV_OVERSAMPLE_8X,
.component_only = 0,

Expand Down Expand Up @@ -589,7 +589,7 @@ static const struct tv_mode tv_modes[] = {
/* 625 Lines, 50 Fields, 15.625KHz line, Sub-Carrier 4.434MHz */
.name = "PAL-N",
.clock = 108000,
.refresh = 25000,
.refresh = 50000,
.oversample = TV_OVERSAMPLE_8X,
.component_only = 0,

Expand Down Expand Up @@ -634,7 +634,7 @@ static const struct tv_mode tv_modes[] = {
/* 625 Lines, 50 Fields, 15.625KHz line, Sub-Carrier 4.434MHz */
.name = "PAL",
.clock = 108000,
.refresh = 25000,
.refresh = 50000,
.oversample = TV_OVERSAMPLE_8X,
.component_only = 0,

Expand Down Expand Up @@ -673,78 +673,6 @@ static const struct tv_mode tv_modes[] = {

.filter_table = filter_table,
},
{
.name = "[email protected]",
.clock = 107520,
.refresh = 59940,
.oversample = TV_OVERSAMPLE_4X,
.component_only = 1,

.hsync_end = 64, .hblank_end = 122,
.hblank_start = 842, .htotal = 857,

.progressive = true, .trilevel_sync = false,

.vsync_start_f1 = 12, .vsync_start_f2 = 12,
.vsync_len = 12,

.veq_ena = false,

.vi_end_f1 = 44, .vi_end_f2 = 44,
.nbr_end = 479,

.burst_ena = false,

.filter_table = filter_table,
},
{
.name = "480p@60Hz",
.clock = 107520,
.refresh = 60000,
.oversample = TV_OVERSAMPLE_4X,
.component_only = 1,

.hsync_end = 64, .hblank_end = 122,
.hblank_start = 842, .htotal = 856,

.progressive = true, .trilevel_sync = false,

.vsync_start_f1 = 12, .vsync_start_f2 = 12,
.vsync_len = 12,

.veq_ena = false,

.vi_end_f1 = 44, .vi_end_f2 = 44,
.nbr_end = 479,

.burst_ena = false,

.filter_table = filter_table,
},
{
.name = "576p",
.clock = 107520,
.refresh = 50000,
.oversample = TV_OVERSAMPLE_4X,
.component_only = 1,

.hsync_end = 64, .hblank_end = 139,
.hblank_start = 859, .htotal = 863,

.progressive = true, .trilevel_sync = false,

.vsync_start_f1 = 10, .vsync_start_f2 = 10,
.vsync_len = 10,

.veq_ena = false,

.vi_end_f1 = 48, .vi_end_f2 = 48,
.nbr_end = 575,

.burst_ena = false,

.filter_table = filter_table,
},
{
.name = "720p@60Hz",
.clock = 148800,
Expand All @@ -769,30 +697,6 @@ static const struct tv_mode tv_modes[] = {

.filter_table = filter_table,
},
{
.name = "[email protected]",
.clock = 148800,
.refresh = 59940,
.oversample = TV_OVERSAMPLE_2X,
.component_only = 1,

.hsync_end = 80, .hblank_end = 300,
.hblank_start = 1580, .htotal = 1651,

.progressive = true, .trilevel_sync = true,

.vsync_start_f1 = 10, .vsync_start_f2 = 10,
.vsync_len = 10,

.veq_ena = false,

.vi_end_f1 = 29, .vi_end_f2 = 29,
.nbr_end = 719,

.burst_ena = false,

.filter_table = filter_table,
},
{
.name = "720p@50Hz",
.clock = 148800,
Expand Down Expand Up @@ -821,7 +725,7 @@ static const struct tv_mode tv_modes[] = {
{
.name = "1080i@50Hz",
.clock = 148800,
.refresh = 25000,
.refresh = 50000,
.oversample = TV_OVERSAMPLE_2X,
.component_only = 1,

Expand All @@ -847,7 +751,7 @@ static const struct tv_mode tv_modes[] = {
{
.name = "1080i@60Hz",
.clock = 148800,
.refresh = 30000,
.refresh = 60000,
.oversample = TV_OVERSAMPLE_2X,
.component_only = 1,

Expand All @@ -868,32 +772,6 @@ static const struct tv_mode tv_modes[] = {

.burst_ena = false,

.filter_table = filter_table,
},
{
.name = "[email protected]",
.clock = 148800,
.refresh = 29970,
.oversample = TV_OVERSAMPLE_2X,
.component_only = 1,

.hsync_end = 88, .hblank_end = 235,
.hblank_start = 2155, .htotal = 2201,

.progressive = false, .trilevel_sync = true,

.vsync_start_f1 = 4, .vsync_start_f2 = 5,
.vsync_len = 10,

.veq_ena = true, .veq_start_f1 = 4,
.veq_start_f2 = 4, .veq_len = 10,


.vi_end_f1 = 21, .vi_end_f2 = 22,
.nbr_end = 539,

.burst_ena = false,

.filter_table = filter_table,
},
};
Expand Down

0 comments on commit a190d70

Please sign in to comment.