disp.h (58f7553fa424fd0fd74e8b796d50c66014cebebe) | disp.h (4c0d42f7ba7f27054f6e21636850c70d624f3cd2) |
---|---|
1/* SPDX-License-Identifier: MIT */ 2#ifndef __NV04_DISPLAY_H__ 3#define __NV04_DISPLAY_H__ 4#include <subdev/bios.h> 5#include <subdev/bios/pll.h> 6 7#include "nouveau_display.h" 8 --- 116 unchanged lines hidden (view full) --- 125 126/* overlay.c */ 127void nouveau_overlay_init(struct drm_device *dev); 128 129static inline bool 130nv_two_heads(struct drm_device *dev) 131{ 132 struct nouveau_drm *drm = nouveau_drm(dev); | 1/* SPDX-License-Identifier: MIT */ 2#ifndef __NV04_DISPLAY_H__ 3#define __NV04_DISPLAY_H__ 4#include <subdev/bios.h> 5#include <subdev/bios/pll.h> 6 7#include "nouveau_display.h" 8 --- 116 unchanged lines hidden (view full) --- 125 126/* overlay.c */ 127void nouveau_overlay_init(struct drm_device *dev); 128 129static inline bool 130nv_two_heads(struct drm_device *dev) 131{ 132 struct nouveau_drm *drm = nouveau_drm(dev); |
133 const int impl = dev->pdev->device & 0x0ff0; | 133 const int impl = to_pci_dev(dev->dev)->device & 0x0ff0; |
134 135 if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS && impl != 0x0100 && 136 impl != 0x0150 && impl != 0x01a0 && impl != 0x0200) 137 return true; 138 139 return false; 140} 141 142static inline bool 143nv_gf4_disp_arch(struct drm_device *dev) 144{ | 134 135 if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS && impl != 0x0100 && 136 impl != 0x0150 && impl != 0x01a0 && impl != 0x0200) 137 return true; 138 139 return false; 140} 141 142static inline bool 143nv_gf4_disp_arch(struct drm_device *dev) 144{ |
145 return nv_two_heads(dev) && (dev->pdev->device & 0x0ff0) != 0x0110; | 145 return nv_two_heads(dev) && (to_pci_dev(dev->dev)->device & 0x0ff0) != 0x0110; |
146} 147 148static inline bool 149nv_two_reg_pll(struct drm_device *dev) 150{ 151 struct nouveau_drm *drm = nouveau_drm(dev); | 146} 147 148static inline bool 149nv_two_reg_pll(struct drm_device *dev) 150{ 151 struct nouveau_drm *drm = nouveau_drm(dev); |
152 const int impl = dev->pdev->device & 0x0ff0; | 152 const int impl = to_pci_dev(dev->dev)->device & 0x0ff0; |
153 154 if (impl == 0x0310 || impl == 0x0340 || drm->client.device.info.family >= NV_DEVICE_INFO_V0_CURIE) 155 return true; 156 return false; 157} 158 159static inline bool 160nv_match_device(struct drm_device *dev, unsigned device, 161 unsigned sub_vendor, unsigned sub_device) 162{ | 153 154 if (impl == 0x0310 || impl == 0x0340 || drm->client.device.info.family >= NV_DEVICE_INFO_V0_CURIE) 155 return true; 156 return false; 157} 158 159static inline bool 160nv_match_device(struct drm_device *dev, unsigned device, 161 unsigned sub_vendor, unsigned sub_device) 162{ |
163 return dev->pdev->device == device && 164 dev->pdev->subsystem_vendor == sub_vendor && 165 dev->pdev->subsystem_device == sub_device; | 163 struct pci_dev *pdev = to_pci_dev(dev->dev); 164 165 return pdev->device == device && 166 pdev->subsystem_vendor == sub_vendor && 167 pdev->subsystem_device == sub_device; |
166} 167 168#include <subdev/bios/init.h> 169 170static inline void 171nouveau_bios_run_init_table(struct drm_device *dev, u16 table, 172 struct dcb_output *outp, int crtc) 173{ 174 nvbios_init(&nvxx_bios(&nouveau_drm(dev)->client.device)->subdev, table, 175 init.outp = outp; 176 init.head = crtc; 177 ); 178} 179 180int nv04_flip_complete(struct nvif_notify *); 181#endif | 168} 169 170#include <subdev/bios/init.h> 171 172static inline void 173nouveau_bios_run_init_table(struct drm_device *dev, u16 table, 174 struct dcb_output *outp, int crtc) 175{ 176 nvbios_init(&nvxx_bios(&nouveau_drm(dev)->client.device)->subdev, table, 177 init.outp = outp; 178 init.head = crtc; 179 ); 180} 181 182int nv04_flip_complete(struct nvif_notify *); 183#endif |