tvnv04.c (5e2aa2ed08e2e280121dc7cf5609c87d464f12ef) | tvnv04.c (967e7bde8739fe3b215f7537e8f1f39c044902af) |
---|---|
1/* 2 * Copyright (C) 2009 Francisco Jerez. 3 * All Rights Reserved. 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining 6 * a copy of this software and associated documentation files (the 7 * "Software"), to deal in the Software without restriction, including 8 * without limitation the rights to use, copy, modify, merge, publish, --- 42 unchanged lines hidden (view full) --- 51 0 52 }, 53 { } 54}; 55 56int nv04_tv_identify(struct drm_device *dev, int i2c_index) 57{ 58 struct nouveau_drm *drm = nouveau_drm(dev); | 1/* 2 * Copyright (C) 2009 Francisco Jerez. 3 * All Rights Reserved. 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining 6 * a copy of this software and associated documentation files (the 7 * "Software"), to deal in the Software without restriction, including 8 * without limitation the rights to use, copy, modify, merge, publish, --- 42 unchanged lines hidden (view full) --- 51 0 52 }, 53 { } 54}; 55 56int nv04_tv_identify(struct drm_device *dev, int i2c_index) 57{ 58 struct nouveau_drm *drm = nouveau_drm(dev); |
59 struct nouveau_i2c *i2c = nouveau_i2c(drm->device); | 59 struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); |
60 61 return i2c->identify(i2c, i2c_index, "TV encoder", 62 nv04_tv_encoder_info, NULL, NULL); 63} 64 65 66#define PLLSEL_TV_CRTC1_MASK \ 67 (NV_PRAMDAC_PLL_COEFF_SELECT_TV_VSCLK1 \ --- 133 unchanged lines hidden (view full) --- 201 202int 203nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry) 204{ 205 struct nouveau_encoder *nv_encoder; 206 struct drm_encoder *encoder; 207 struct drm_device *dev = connector->dev; 208 struct nouveau_drm *drm = nouveau_drm(dev); | 60 61 return i2c->identify(i2c, i2c_index, "TV encoder", 62 nv04_tv_encoder_info, NULL, NULL); 63} 64 65 66#define PLLSEL_TV_CRTC1_MASK \ 67 (NV_PRAMDAC_PLL_COEFF_SELECT_TV_VSCLK1 \ --- 133 unchanged lines hidden (view full) --- 201 202int 203nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry) 204{ 205 struct nouveau_encoder *nv_encoder; 206 struct drm_encoder *encoder; 207 struct drm_device *dev = connector->dev; 208 struct nouveau_drm *drm = nouveau_drm(dev); |
209 struct nouveau_i2c *i2c = nouveau_i2c(drm->device); | 209 struct nouveau_i2c *i2c = nvkm_i2c(&drm->device); |
210 struct nouveau_i2c_port *port = i2c->find(i2c, entry->i2c_index); 211 int type, ret; 212 213 /* Ensure that we can talk to this encoder */ 214 type = nv04_tv_identify(dev, entry->i2c_index); 215 if (type < 0) 216 return type; 217 --- 34 unchanged lines hidden --- | 210 struct nouveau_i2c_port *port = i2c->find(i2c, entry->i2c_index); 211 int type, ret; 212 213 /* Ensure that we can talk to this encoder */ 214 type = nv04_tv_identify(dev, entry->i2c_index); 215 if (type < 0) 216 return type; 217 --- 34 unchanged lines hidden --- |