mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-06-09 18:38:24 +02:00
nv50/kms: use DRM_DEBUG
This commit is contained in:
parent
988b805fd6
commit
15ed426dd4
10 changed files with 68 additions and 71 deletions
|
|
@ -94,7 +94,7 @@ static int nv50_connector_hpd_detect(struct nv50_connector *connector)
|
|||
|
||||
/* Assume connected for the moment. */
|
||||
if (connector->base.connector_type == DRM_MODE_CONNECTOR_LVDS) {
|
||||
NV50_DEBUG("LVDS is defaulting to connected for the moment.\n");
|
||||
DRM_DEBUG("LVDS is defaulting to connected for the moment.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -116,9 +116,9 @@ static int nv50_connector_hpd_detect(struct nv50_connector *connector)
|
|||
present = 1;
|
||||
|
||||
if (present)
|
||||
NV50_DEBUG("Hotplug detect returned positive for bus %d\n", connector->bus);
|
||||
DRM_DEBUG("Hotplug detect returned positive for bus %d\n", connector->bus);
|
||||
else
|
||||
NV50_DEBUG("Hotplug detect returned negative for bus %d\n", connector->bus);
|
||||
DRM_DEBUG("Hotplug detect returned negative for bus %d\n", connector->bus);
|
||||
|
||||
return present;
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ static int nv50_connector_i2c_detect(struct nv50_connector *connector)
|
|||
return -EINVAL;
|
||||
|
||||
ret = i2c_transfer(&connector->i2c_chan->adapter, msgs, 2);
|
||||
NV50_DEBUG("I2C detect returned %d\n", ret);
|
||||
DRM_DEBUG("I2C detect returned %d\n", ret);
|
||||
|
||||
if (ret == 2)
|
||||
return true;
|
||||
|
|
@ -162,7 +162,7 @@ static void nv50_connector_destroy(struct drm_connector *drm_connector)
|
|||
struct drm_device *dev = connector->base.dev;
|
||||
struct nv50_display *display = nv50_get_display(dev);
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!display || !connector)
|
||||
return;
|
||||
|
|
@ -336,7 +336,7 @@ static void nv50_connector_fill_modes(struct drm_connector *drm_connector, uint3
|
|||
struct drm_display_mode *mode, *t;
|
||||
struct edid *edid = NULL;
|
||||
|
||||
NV50_DEBUG("%s\n", drm_get_connector_name(drm_connector));
|
||||
DRM_DEBUG("%s\n", drm_get_connector_name(drm_connector));
|
||||
/* set all modes to the unverified state */
|
||||
list_for_each_entry_safe(mode, t, &drm_connector->modes, head)
|
||||
mode->status = MODE_UNVERIFIED;
|
||||
|
|
@ -345,9 +345,9 @@ static void nv50_connector_fill_modes(struct drm_connector *drm_connector, uint3
|
|||
connected = true;
|
||||
|
||||
if (connected)
|
||||
NV50_DEBUG("%s is connected\n", drm_get_connector_name(drm_connector));
|
||||
DRM_DEBUG("%s is connected\n", drm_get_connector_name(drm_connector));
|
||||
else
|
||||
NV50_DEBUG("%s is disconnected\n", drm_get_connector_name(drm_connector));
|
||||
DRM_DEBUG("%s is disconnected\n", drm_get_connector_name(drm_connector));
|
||||
|
||||
/* Not all connnectors have an i2c channel. */
|
||||
if (connected && connector->i2c_chan)
|
||||
|
|
@ -403,7 +403,7 @@ static void nv50_connector_fill_modes(struct drm_connector *drm_connector, uint3
|
|||
struct drm_display_mode *stdmode;
|
||||
struct nv50_output *output;
|
||||
|
||||
NV50_DEBUG("No valid modes on %s\n", drm_get_connector_name(drm_connector));
|
||||
DRM_DEBUG("No valid modes on %s\n", drm_get_connector_name(drm_connector));
|
||||
|
||||
/* Making up native modes for LVDS is a bad idea. */
|
||||
if (drm_connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
|
||||
|
|
@ -431,7 +431,7 @@ static void nv50_connector_fill_modes(struct drm_connector *drm_connector, uint3
|
|||
|
||||
drm_mode_sort(&drm_connector->modes);
|
||||
|
||||
NV50_DEBUG("Probed modes for %s\n", drm_get_connector_name(drm_connector));
|
||||
DRM_DEBUG("Probed modes for %s\n", drm_get_connector_name(drm_connector));
|
||||
|
||||
list_for_each_entry_safe(mode, t, &drm_connector->modes, head) {
|
||||
mode->vrefresh = drm_mode_vrefresh(mode);
|
||||
|
|
@ -560,7 +560,7 @@ int nv50_connector_create(struct drm_device *dev, int bus, int i2c_index, int ty
|
|||
struct nv50_display *display = NULL;
|
||||
int i;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
display = nv50_get_display(dev);
|
||||
if (!display || type == DRM_MODE_CONNECTOR_Unknown)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
static int nv50_crtc_validate_mode(struct nv50_crtc *crtc, struct drm_display_mode *mode)
|
||||
{
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (mode->clock > 400000)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
|
@ -48,7 +48,7 @@ static int nv50_crtc_set_mode(struct nv50_crtc *crtc, struct drm_display_mode *m
|
|||
struct drm_display_mode *hw_mode = crtc->mode;
|
||||
uint8_t rval;
|
||||
|
||||
NV50_DEBUG("index %d\n", crtc->index);
|
||||
DRM_DEBUG("index %d\n", crtc->index);
|
||||
|
||||
if (!mode) {
|
||||
DRM_ERROR("No mode\n");
|
||||
|
|
@ -73,8 +73,8 @@ static int nv50_crtc_execute_mode(struct nv50_crtc *crtc)
|
|||
uint32_t hunk1, vunk1, vunk2a, vunk2b;
|
||||
uint32_t offset = crtc->index * 0x400;
|
||||
|
||||
NV50_DEBUG("index %d\n", crtc->index);
|
||||
NV50_DEBUG("%s native mode\n", crtc->use_native_mode ? "using" : "not using");
|
||||
DRM_DEBUG("index %d\n", crtc->index);
|
||||
DRM_DEBUG("%s native mode\n", crtc->use_native_mode ? "using" : "not using");
|
||||
|
||||
if (crtc->use_native_mode)
|
||||
mode = crtc->native_mode;
|
||||
|
|
@ -138,7 +138,7 @@ static int nv50_crtc_set_fb(struct nv50_crtc *crtc)
|
|||
struct drm_framebuffer *drm_fb = crtc->base.fb;
|
||||
uint32_t offset = crtc->index * 0x400;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
OUT_MODE(NV50_CRTC0_FB_SIZE + offset, drm_fb->height << 16 | drm_fb->width);
|
||||
|
||||
|
|
@ -171,8 +171,8 @@ static int nv50_crtc_blank(struct nv50_crtc *crtc, bool blanked)
|
|||
struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
|
||||
uint32_t offset = crtc->index * 0x400;
|
||||
|
||||
NV50_DEBUG("index %d\n", crtc->index);
|
||||
NV50_DEBUG("%s\n", blanked ? "blanked" : "unblanked");
|
||||
DRM_DEBUG("index %d\n", crtc->index);
|
||||
DRM_DEBUG("%s\n", blanked ? "blanked" : "unblanked");
|
||||
|
||||
if (blanked) {
|
||||
crtc->cursor->hide(crtc);
|
||||
|
|
@ -222,7 +222,7 @@ static int nv50_crtc_set_dither(struct nv50_crtc *crtc)
|
|||
struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
|
||||
uint32_t offset = crtc->index * 0x400;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
OUT_MODE(NV50_CRTC0_DITHERING_CTRL + offset, crtc->use_dithering ?
|
||||
NV50_CRTC0_DITHERING_CTRL_ON : NV50_CRTC0_DITHERING_CTRL_OFF);
|
||||
|
|
@ -253,7 +253,7 @@ static int nv50_crtc_set_scale(struct nv50_crtc *crtc)
|
|||
uint32_t offset = crtc->index * 0x400;
|
||||
uint32_t outX, outY;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
switch (crtc->requested_scaling_mode) {
|
||||
case DRM_MODE_SCALE_ASPECT:
|
||||
|
|
@ -303,7 +303,7 @@ static int nv50_crtc_calc_clock(struct nv50_crtc *crtc,
|
|||
int delta, bestdelta = INT_MAX;
|
||||
int bestclk = 0;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (crtc->use_native_mode)
|
||||
mode = crtc->native_mode;
|
||||
|
|
@ -404,7 +404,7 @@ static int nv50_crtc_set_clock(struct nv50_crtc *crtc)
|
|||
uint32_t reg1 = NV_READ(pll_reg + 4);
|
||||
uint32_t reg2 = NV_READ(pll_reg + 8);
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
NV_WRITE(pll_reg, NV50_PDISPLAY_CRTC_CLK_CLK_CTRL1_CONNECTED | 0x10000011);
|
||||
|
||||
|
|
@ -415,7 +415,7 @@ static int nv50_crtc_set_clock(struct nv50_crtc *crtc)
|
|||
if (!nv50_crtc_calc_clock(crtc, &N1, &N2, &M1, &M2, &log2P))
|
||||
return -EINVAL;
|
||||
|
||||
NV50_DEBUG("N1 %d N2 %d M1 %d M2 %d log2P %d\n", N1, N2, M1, M2, log2P);
|
||||
DRM_DEBUG("N1 %d N2 %d M1 %d M2 %d log2P %d\n", N1, N2, M1, M2, log2P);
|
||||
|
||||
reg1 |= (M1 << 16) | N1;
|
||||
reg2 |= (log2P << 28) | (M2 << 16) | N2;
|
||||
|
|
@ -430,7 +430,7 @@ static int nv50_crtc_set_clock_mode(struct nv50_crtc *crtc)
|
|||
{
|
||||
struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
/* This acknowledges a clock request. */
|
||||
NV_WRITE(NV50_PDISPLAY_CRTC_CLK_CLK_CTRL2(crtc->index), 0);
|
||||
|
|
@ -442,7 +442,7 @@ static void nv50_crtc_destroy(struct drm_crtc *drm_crtc)
|
|||
{
|
||||
struct nv50_crtc *crtc = to_nv50_crtc(drm_crtc);
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!crtc)
|
||||
return;
|
||||
|
|
@ -533,7 +533,7 @@ int nv50_crtc_set_config(struct drm_mode_set *set)
|
|||
bool switch_fb = false;
|
||||
bool modeset = false;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
/*
|
||||
* Supported operations:
|
||||
|
|
@ -991,7 +991,7 @@ int nv50_crtc_create(struct drm_device *dev, int index)
|
|||
struct nv50_crtc *crtc = NULL;
|
||||
struct nv50_display *display = NULL;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
display = nv50_get_display(dev);
|
||||
if (!display)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ static int nv50_cursor_enable(struct nv50_crtc *crtc)
|
|||
{
|
||||
struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
NV_WRITE(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(crtc->index), 0x2000);
|
||||
while(NV_READ(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(crtc->index)) & NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_MASK);
|
||||
|
|
@ -50,7 +50,7 @@ static int nv50_cursor_disable(struct nv50_crtc *crtc)
|
|||
{
|
||||
struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
NV_WRITE(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(crtc->index), 0);
|
||||
while(NV_READ(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(crtc->index)) & NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_MASK);
|
||||
|
|
@ -66,7 +66,7 @@ static int nv50_cursor_show(struct nv50_crtc *crtc)
|
|||
struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
|
||||
uint32_t offset = crtc->index * 0x400;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
/* Better not show the cursor when we have none. */
|
||||
/* TODO: is cursor offset actually set? */
|
||||
|
|
@ -86,7 +86,7 @@ static int nv50_cursor_hide(struct nv50_crtc *crtc)
|
|||
struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
|
||||
uint32_t offset = crtc->index * 0x400;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
OUT_MODE(NV50_CRTC0_CURSOR_CTRL + offset, NV50_CRTC0_CURSOR_CTRL_HIDE);
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ static int nv50_cursor_set_offset(struct nv50_crtc *crtc)
|
|||
struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
|
||||
struct nouveau_gem_object *ngem = nouveau_gem_object(crtc->cursor->gem);
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (ngem) {
|
||||
OUT_MODE(NV50_CRTC0_CURSOR_OFFSET + crtc->index * 0x400,
|
||||
|
|
@ -141,7 +141,7 @@ nv50_cursor_set_bo(struct nv50_crtc *crtc, struct drm_gem_object *gem)
|
|||
|
||||
int nv50_cursor_create(struct nv50_crtc *crtc)
|
||||
{
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!crtc)
|
||||
return -EINVAL;
|
||||
|
|
@ -166,7 +166,7 @@ int nv50_cursor_destroy(struct nv50_crtc *crtc)
|
|||
{
|
||||
int rval = 0;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!crtc)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
static int nv50_dac_validate_mode(struct nv50_output *output,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (mode->clock > 400000)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
|
@ -50,10 +50,10 @@ static int nv50_dac_execute_mode(struct nv50_output *output, bool disconnect)
|
|||
uint32_t mode_ctl = NV50_DAC_MODE_CTRL_OFF;
|
||||
uint32_t mode_ctl2 = 0;
|
||||
|
||||
NV50_DEBUG("or %d\n", output->or);
|
||||
DRM_DEBUG("or %d\n", output->or);
|
||||
|
||||
if (disconnect) {
|
||||
NV50_DEBUG("Disconnecting DAC\n");
|
||||
DRM_DEBUG("Disconnecting DAC\n");
|
||||
OUT_MODE(NV50_DAC0_MODE_CTRL + offset, mode_ctl);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ static int nv50_dac_set_clock_mode(struct nv50_output *output)
|
|||
{
|
||||
struct drm_nouveau_private *dev_priv = output->base.dev->dev_private;
|
||||
|
||||
NV50_DEBUG("or %d\n", output->or);
|
||||
DRM_DEBUG("or %d\n", output->or);
|
||||
|
||||
NV_WRITE(NV50_PDISPLAY_DAC_CLK_CLK_CTRL2(output->or), 0);
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ static int nv50_dac_set_power_mode(struct nv50_output *output, int mode)
|
|||
uint32_t val;
|
||||
int or = output->or;
|
||||
|
||||
NV50_DEBUG("or %d\n", or);
|
||||
DRM_DEBUG("or %d\n", or);
|
||||
|
||||
/* wait for it to be done */
|
||||
while (NV_READ(NV50_PDISPLAY_DAC_REGS_DPMS_CTRL(or)) & NV50_PDISPLAY_DAC_REGS_DPMS_CTRL_PENDING);
|
||||
|
|
@ -150,10 +150,10 @@ static int nv50_dac_detect(struct nv50_output *output)
|
|||
/* Use bios provided value if possible. */
|
||||
if (dev_priv->bios.dactestval) {
|
||||
load_pattern = dev_priv->bios.dactestval;
|
||||
NV50_DEBUG("Using bios provided load_pattern of %d\n", load_pattern);
|
||||
DRM_DEBUG("Using bios provided load_pattern of %d\n", load_pattern);
|
||||
} else {
|
||||
load_pattern = 340;
|
||||
NV50_DEBUG("Using default load_pattern of %d\n", load_pattern);
|
||||
DRM_DEBUG("Using default load_pattern of %d\n", load_pattern);
|
||||
}
|
||||
|
||||
NV_WRITE(NV50_PDISPLAY_DAC_REGS_LOAD_CTRL(or), NV50_PDISPLAY_DAC_REGS_LOAD_CTRL_ACTIVE | load_pattern);
|
||||
|
|
@ -167,9 +167,9 @@ static int nv50_dac_detect(struct nv50_output *output)
|
|||
present = 1;
|
||||
|
||||
if (present)
|
||||
NV50_DEBUG("Load was detected on output with or %d\n", or);
|
||||
DRM_DEBUG("Load was detected on output with or %d\n", or);
|
||||
else
|
||||
NV50_DEBUG("Load was not detected on output with or %d\n", or);
|
||||
DRM_DEBUG("Load was not detected on output with or %d\n", or);
|
||||
|
||||
return present;
|
||||
}
|
||||
|
|
@ -178,7 +178,7 @@ static void nv50_dac_destroy(struct drm_encoder *drm_encoder)
|
|||
{
|
||||
struct nv50_output *output = to_nv50_output(drm_encoder);
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!drm_encoder)
|
||||
return;
|
||||
|
|
@ -197,7 +197,7 @@ int nv50_dac_create(struct drm_device *dev, struct dcb_entry *entry)
|
|||
{
|
||||
struct nv50_output *output = NULL;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
DRM_INFO("Detected a DAC output\n");
|
||||
|
||||
output = kzalloc(sizeof(*output), GFP_KERNEL);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static int nv50_display_pre_init(struct nv50_display *display)
|
|||
int i;
|
||||
uint32_t ram_amount;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
NV_WRITE(0x00610184, NV_READ(0x00614004));
|
||||
/*
|
||||
|
|
@ -74,7 +74,7 @@ static int nv50_display_pre_init(struct nv50_display *display)
|
|||
NV_WRITE(NV50_PDISPLAY_UNK_380, 0);
|
||||
/* RAM is clamped to 256 MiB. */
|
||||
ram_amount = nouveau_mem_fb_amount(display->dev);
|
||||
NV50_DEBUG("ram_amount %d\n", ram_amount);
|
||||
DRM_DEBUG("ram_amount %d\n", ram_amount);
|
||||
if (ram_amount > 256*1024*1024)
|
||||
ram_amount = 256*1024*1024;
|
||||
NV_WRITE(NV50_PDISPLAY_RAM_AMOUNT, ram_amount - 1);
|
||||
|
|
@ -92,7 +92,7 @@ static int nv50_display_init(struct nv50_display *display)
|
|||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
uint32_t val;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
/* The precise purpose is unknown, i suspect it has something to do with text mode. */
|
||||
if (NV_READ(NV50_PDISPLAY_SUPERVISOR) & 0x100) {
|
||||
|
|
@ -142,7 +142,7 @@ static int nv50_display_disable(struct nv50_display *display)
|
|||
struct drm_crtc *drm_crtc;
|
||||
int i;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
list_for_each_entry(drm_crtc, &dev->mode_config.crtc_list, head) {
|
||||
struct nv50_crtc *crtc = to_nv50_crtc(drm_crtc);
|
||||
|
|
@ -193,7 +193,7 @@ static int nv50_display_update(struct nv50_display *display)
|
|||
struct drm_device *dev = display->dev;
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
OUT_MODE(NV50_UPDATE_DISPLAY, 0);
|
||||
|
||||
|
|
@ -277,7 +277,7 @@ int nv50_display_create(struct drm_device *dev)
|
|||
uint32_t bus_digital = 0, bus_analog = 0;
|
||||
int ret, i;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
display = kzalloc(sizeof(*display), GFP_KERNEL);
|
||||
if (!display)
|
||||
|
|
@ -394,7 +394,7 @@ int nv50_display_destroy(struct drm_device *dev)
|
|||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nv50_display *display = nv50_get_display(dev);
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (display->init_done)
|
||||
display->disable(display);
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@
|
|||
#include "nouveau_reg.h"
|
||||
#include "nv50_display_commands.h"
|
||||
|
||||
/* for convience, so you can see through the trees. */
|
||||
#define NV50_DEBUG DRM_ERROR
|
||||
|
||||
struct nv50_crtc;
|
||||
struct nv50_output;
|
||||
struct nv50_connector;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ static int nv50_fbcon_check_var(struct fb_var_screeninfo *var, struct fb_info *i
|
|||
struct drm_framebuffer *drm_fb = par->fb;
|
||||
int depth;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!var || !drm_fb || !info) {
|
||||
DRM_ERROR("No var, drm_fb or info\n");
|
||||
|
|
@ -179,7 +179,7 @@ static int nv50_fbcon_set_par(struct fb_info *info)
|
|||
int rval;
|
||||
bool crtc_used[2] = {false, false};
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!info) {
|
||||
DRM_ERROR("No fb_info\n");
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ static int nv50_lut_alloc(struct nv50_crtc *crtc)
|
|||
struct drm_device *dev = crtc->base.dev;
|
||||
int ret;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
ret = drm_buffer_object_create(dev, 4096, drm_bo_type_kernel,
|
||||
DRM_BO_FLAG_MEM_VRAM |
|
||||
|
|
@ -57,7 +57,7 @@ static int nv50_lut_alloc(struct nv50_crtc *crtc)
|
|||
|
||||
static int nv50_lut_free(struct nv50_crtc *crtc)
|
||||
{
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (crtc->lut->bo) {
|
||||
drm_bo_kunmap(&crtc->lut->kmap);
|
||||
|
|
@ -75,7 +75,7 @@ static int nv50_lut_set(struct nv50_crtc *crtc,
|
|||
uint32_t index = 0, i;
|
||||
void __iomem *lut;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!crtc->lut || !crtc->lut->bo) {
|
||||
DRM_ERROR("Something wrong with the LUT\n");
|
||||
|
|
@ -127,7 +127,7 @@ int nv50_lut_create(struct nv50_crtc *crtc)
|
|||
{
|
||||
int rval = 0;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!crtc)
|
||||
return -EINVAL;
|
||||
|
|
@ -161,7 +161,7 @@ int nv50_lut_destroy(struct nv50_crtc *crtc)
|
|||
{
|
||||
int rval = 0;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!crtc)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
static int nv50_sor_validate_mode(struct nv50_output *output,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (mode->clock > 165000) /* no dual link until we figure it out completely */
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
|
@ -54,10 +54,10 @@ static int nv50_sor_execute_mode(struct nv50_output *output, bool disconnect)
|
|||
uint32_t offset = output->or * 0x40;
|
||||
uint32_t mode_ctl = NV50_SOR_MODE_CTRL_OFF;
|
||||
|
||||
NV50_DEBUG("or %d\n", output->or);
|
||||
DRM_DEBUG("or %d\n", output->or);
|
||||
|
||||
if (disconnect) {
|
||||
NV50_DEBUG("Disconnecting SOR\n");
|
||||
DRM_DEBUG("Disconnecting SOR\n");
|
||||
OUT_MODE(NV50_SOR0_MODE_CTRL + offset, mode_ctl);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ static int nv50_sor_set_clock_mode(struct nv50_output *output)
|
|||
uint32_t limit = 165000;
|
||||
struct drm_display_mode *mode;
|
||||
|
||||
NV50_DEBUG("or %d\n", output->or);
|
||||
DRM_DEBUG("or %d\n", output->or);
|
||||
|
||||
/* We don't yet know what to do, if anything at all. */
|
||||
if (output->base.encoder_type == DRM_MODE_ENCODER_LVDS)
|
||||
|
|
@ -120,7 +120,7 @@ static int nv50_sor_set_power_mode(struct nv50_output *output, int mode)
|
|||
uint32_t val;
|
||||
int or = output->or;
|
||||
|
||||
NV50_DEBUG("or %d\n", output->or);
|
||||
DRM_DEBUG("or %d\n", output->or);
|
||||
|
||||
/* wait for it to be done */
|
||||
while (NV_READ(NV50_PDISPLAY_SOR_REGS_DPMS_CTRL(or)) & NV50_PDISPLAY_SOR_REGS_DPMS_CTRL_PENDING);
|
||||
|
|
@ -141,7 +141,7 @@ static void nv50_sor_destroy(struct drm_encoder *drm_encoder)
|
|||
{
|
||||
struct nv50_output *output = to_nv50_output(drm_encoder);
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!drm_encoder)
|
||||
return;
|
||||
|
|
@ -162,7 +162,7 @@ int nv50_sor_create(struct drm_device *dev, struct dcb_entry *entry)
|
|||
struct nv50_output *output = NULL;
|
||||
int type;
|
||||
|
||||
NV50_DEBUG("\n");
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
switch (entry->type) {
|
||||
case DCB_OUTPUT_TMDS:
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ nouveau_nv50_display_irq_handler(struct drm_device *dev)
|
|||
if (val & NV50_PDISPLAY_SUPERVISOR_CLK_MASK) {
|
||||
uint32_t state = (val & NV50_PDISPLAY_SUPERVISOR_CLK_MASK) >> NV50_PDISPLAY_SUPERVISOR_CLK_MASK__SHIFT;
|
||||
|
||||
NV50_DEBUG("state %d\n", state);
|
||||
DRM_DEBUG("state %d\n", state);
|
||||
|
||||
/* Set pll */
|
||||
if (state == 2) {
|
||||
|
|
@ -582,7 +582,7 @@ nouveau_nv50_display_irq_handler(struct drm_device *dev)
|
|||
if (clock_change)
|
||||
crtc->set_clock(crtc);
|
||||
|
||||
NV50_DEBUG("index %d clock_change %d clock_ack %d\n", crtc_index, clock_change, clock_ack);
|
||||
DRM_DEBUG("index %d clock_change %d clock_ack %d\n", crtc_index, clock_change, clock_ack);
|
||||
|
||||
if (!clock_ack)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue