1 /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*-
5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sub license, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
16 * The above copyright notice and this permission notice (including the
17 * next paragraph) shall be included in all copies or substantial portions
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
23 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
24 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 #include "drm_pciids.h"
37 static struct pci_device_id pciidlist[] = {
46 static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)
48 struct drm_i915_private *dev_priv = dev->dev_private;
51 return (I915_READ(DPLL_A) & DPLL_VCO_ENABLE);
53 return (I915_READ(DPLL_B) & DPLL_VCO_ENABLE);
56 static void i915_save_palette(struct drm_device *dev, enum pipe pipe)
58 struct drm_i915_private *dev_priv = dev->dev_private;
59 unsigned long reg = (pipe == PIPE_A ? PALETTE_A : PALETTE_B);
63 if (!i915_pipe_enabled(dev, pipe))
67 array = dev_priv->save_palette_a;
69 array = dev_priv->save_palette_b;
71 for(i = 0; i < 256; i++)
72 array[i] = I915_READ(reg + (i << 2));
75 static void i915_restore_palette(struct drm_device *dev, enum pipe pipe)
77 struct drm_i915_private *dev_priv = dev->dev_private;
78 unsigned long reg = (pipe == PIPE_A ? PALETTE_A : PALETTE_B);
82 if (!i915_pipe_enabled(dev, pipe))
86 array = dev_priv->save_palette_a;
88 array = dev_priv->save_palette_b;
90 for(i = 0; i < 256; i++)
91 I915_WRITE(reg + (i << 2), array[i]);
94 static u8 i915_read_indexed(u16 index_port, u16 data_port, u8 reg)
96 outb(reg, index_port);
97 return inb(data_port);
100 static u8 i915_read_ar(u16 st01, u8 reg, u16 palette_enable)
103 outb(palette_enable | reg, VGA_AR_INDEX);
104 return inb(VGA_AR_DATA_READ);
107 static void i915_write_ar(u8 st01, u8 reg, u8 val, u16 palette_enable)
110 outb(palette_enable | reg, VGA_AR_INDEX);
111 outb(val, VGA_AR_DATA_WRITE);
114 static void i915_write_indexed(u16 index_port, u16 data_port, u8 reg, u8 val)
116 outb(reg, index_port);
117 outb(val, data_port);
120 static void i915_save_vga(struct drm_device *dev)
122 struct drm_i915_private *dev_priv = dev->dev_private;
124 u16 cr_index, cr_data, st01;
126 /* VGA color palette registers */
127 dev_priv->saveDACMASK = inb(VGA_DACMASK);
128 /* DACCRX automatically increments during read */
130 /* Read 3 bytes of color data from each index */
131 for (i = 0; i < 256 * 3; i++)
132 dev_priv->saveDACDATA[i] = inb(VGA_DACDATA);
135 dev_priv->saveMSR = inb(VGA_MSR_READ);
136 if (dev_priv->saveMSR & VGA_MSR_CGA_MODE) {
137 cr_index = VGA_CR_INDEX_CGA;
138 cr_data = VGA_CR_DATA_CGA;
141 cr_index = VGA_CR_INDEX_MDA;
142 cr_data = VGA_CR_DATA_MDA;
146 /* CRT controller regs */
147 i915_write_indexed(cr_index, cr_data, 0x11,
148 i915_read_indexed(cr_index, cr_data, 0x11) &
150 for (i = 0; i < 0x24; i++)
151 dev_priv->saveCR[i] =
152 i915_read_indexed(cr_index, cr_data, i);
153 /* Make sure we don't turn off CR group 0 writes */
154 dev_priv->saveCR[0x11] &= ~0x80;
156 /* Attribute controller registers */
158 dev_priv->saveAR_INDEX = inb(VGA_AR_INDEX);
159 for (i = 0; i < 20; i++)
160 dev_priv->saveAR[i] = i915_read_ar(st01, i, 0);
162 outb(dev_priv->saveAR_INDEX, VGA_AR_INDEX);
165 /* Graphics controller registers */
166 for (i = 0; i < 9; i++)
167 dev_priv->saveGR[i] =
168 i915_read_indexed(VGA_GR_INDEX, VGA_GR_DATA, i);
170 dev_priv->saveGR[0x10] =
171 i915_read_indexed(VGA_GR_INDEX, VGA_GR_DATA, 0x10);
172 dev_priv->saveGR[0x11] =
173 i915_read_indexed(VGA_GR_INDEX, VGA_GR_DATA, 0x11);
174 dev_priv->saveGR[0x18] =
175 i915_read_indexed(VGA_GR_INDEX, VGA_GR_DATA, 0x18);
177 /* Sequencer registers */
178 for (i = 0; i < 8; i++)
179 dev_priv->saveSR[i] =
180 i915_read_indexed(VGA_SR_INDEX, VGA_SR_DATA, i);
183 static void i915_restore_vga(struct drm_device *dev)
185 struct drm_i915_private *dev_priv = dev->dev_private;
187 u16 cr_index, cr_data, st01;
190 outb(dev_priv->saveMSR, VGA_MSR_WRITE);
191 if (dev_priv->saveMSR & VGA_MSR_CGA_MODE) {
192 cr_index = VGA_CR_INDEX_CGA;
193 cr_data = VGA_CR_DATA_CGA;
196 cr_index = VGA_CR_INDEX_MDA;
197 cr_data = VGA_CR_DATA_MDA;
201 /* Sequencer registers, don't write SR07 */
202 for (i = 0; i < 7; i++)
203 i915_write_indexed(VGA_SR_INDEX, VGA_SR_DATA, i,
204 dev_priv->saveSR[i]);
206 /* CRT controller regs */
207 /* Enable CR group 0 writes */
208 i915_write_indexed(cr_index, cr_data, 0x11, dev_priv->saveCR[0x11]);
209 for (i = 0; i < 0x24; i++)
210 i915_write_indexed(cr_index, cr_data, i, dev_priv->saveCR[i]);
212 /* Graphics controller regs */
213 for (i = 0; i < 9; i++)
214 i915_write_indexed(VGA_GR_INDEX, VGA_GR_DATA, i,
215 dev_priv->saveGR[i]);
217 i915_write_indexed(VGA_GR_INDEX, VGA_GR_DATA, 0x10,
218 dev_priv->saveGR[0x10]);
219 i915_write_indexed(VGA_GR_INDEX, VGA_GR_DATA, 0x11,
220 dev_priv->saveGR[0x11]);
221 i915_write_indexed(VGA_GR_INDEX, VGA_GR_DATA, 0x18,
222 dev_priv->saveGR[0x18]);
224 /* Attribute controller registers */
225 for (i = 0; i < 20; i++)
226 i915_write_ar(st01, i, dev_priv->saveAR[i], 0);
227 inb(st01); /* switch back to index mode */
228 outb(dev_priv->saveAR_INDEX | 0x20, VGA_AR_INDEX);
231 /* VGA color palette registers */
232 outb(dev_priv->saveDACMASK, VGA_DACMASK);
233 /* DACCRX automatically increments during read */
235 /* Read 3 bytes of color data from each index */
236 for (i = 0; i < 256 * 3; i++)
237 outb(dev_priv->saveDACDATA[i], VGA_DACDATA);
241 static int i915_suspend(struct drm_device *dev, pm_message_t state)
243 struct drm_i915_private *dev_priv = dev->dev_private;
246 if (!dev || !dev_priv) {
247 printk(KERN_ERR "dev: %p, dev_priv: %p\n", dev, dev_priv);
248 printk(KERN_ERR "DRM not initialized, aborting suspend.\n");
252 if (state.event == PM_EVENT_PRETHAW)
255 pci_save_state(dev->pdev);
256 pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB);
258 /* Pipe & plane A info */
259 dev_priv->savePIPEACONF = I915_READ(PIPEACONF);
260 dev_priv->savePIPEASRC = I915_READ(PIPEASRC);
261 dev_priv->saveFPA0 = I915_READ(FPA0);
262 dev_priv->saveFPA1 = I915_READ(FPA1);
263 dev_priv->saveDPLL_A = I915_READ(DPLL_A);
265 dev_priv->saveDPLL_A_MD = I915_READ(DPLL_A_MD);
266 dev_priv->saveHTOTAL_A = I915_READ(HTOTAL_A);
267 dev_priv->saveHBLANK_A = I915_READ(HBLANK_A);
268 dev_priv->saveHSYNC_A = I915_READ(HSYNC_A);
269 dev_priv->saveVTOTAL_A = I915_READ(VTOTAL_A);
270 dev_priv->saveVBLANK_A = I915_READ(VBLANK_A);
271 dev_priv->saveVSYNC_A = I915_READ(VSYNC_A);
272 dev_priv->saveBCLRPAT_A = I915_READ(BCLRPAT_A);
274 dev_priv->saveDSPACNTR = I915_READ(DSPACNTR);
275 dev_priv->saveDSPASTRIDE = I915_READ(DSPASTRIDE);
276 dev_priv->saveDSPASIZE = I915_READ(DSPASIZE);
277 dev_priv->saveDSPAPOS = I915_READ(DSPAPOS);
278 dev_priv->saveDSPABASE = I915_READ(DSPABASE);
280 dev_priv->saveDSPASURF = I915_READ(DSPASURF);
281 dev_priv->saveDSPATILEOFF = I915_READ(DSPATILEOFF);
283 i915_save_palette(dev, PIPE_A);
284 dev_priv->savePIPEASTAT = I915_READ(I915REG_PIPEASTAT);
286 /* Pipe & plane B info */
287 dev_priv->savePIPEBCONF = I915_READ(PIPEBCONF);
288 dev_priv->savePIPEBSRC = I915_READ(PIPEBSRC);
289 dev_priv->saveFPB0 = I915_READ(FPB0);
290 dev_priv->saveFPB1 = I915_READ(FPB1);
291 dev_priv->saveDPLL_B = I915_READ(DPLL_B);
293 dev_priv->saveDPLL_B_MD = I915_READ(DPLL_B_MD);
294 dev_priv->saveHTOTAL_B = I915_READ(HTOTAL_B);
295 dev_priv->saveHBLANK_B = I915_READ(HBLANK_B);
296 dev_priv->saveHSYNC_B = I915_READ(HSYNC_B);
297 dev_priv->saveVTOTAL_B = I915_READ(VTOTAL_B);
298 dev_priv->saveVBLANK_B = I915_READ(VBLANK_B);
299 dev_priv->saveVSYNC_B = I915_READ(VSYNC_B);
300 dev_priv->saveBCLRPAT_A = I915_READ(BCLRPAT_A);
302 dev_priv->saveDSPBCNTR = I915_READ(DSPBCNTR);
303 dev_priv->saveDSPBSTRIDE = I915_READ(DSPBSTRIDE);
304 dev_priv->saveDSPBSIZE = I915_READ(DSPBSIZE);
305 dev_priv->saveDSPBPOS = I915_READ(DSPBPOS);
306 dev_priv->saveDSPBBASE = I915_READ(DSPBBASE);
307 if (IS_I965GM(dev) || IS_IGD_GM(dev)) {
308 dev_priv->saveDSPBSURF = I915_READ(DSPBSURF);
309 dev_priv->saveDSPBTILEOFF = I915_READ(DSPBTILEOFF);
311 i915_save_palette(dev, PIPE_B);
312 dev_priv->savePIPEBSTAT = I915_READ(I915REG_PIPEBSTAT);
315 dev_priv->saveADPA = I915_READ(ADPA);
318 dev_priv->savePP_CONTROL = I915_READ(PP_CONTROL);
319 dev_priv->savePFIT_PGM_RATIOS = I915_READ(PFIT_PGM_RATIOS);
320 dev_priv->saveBLC_PWM_CTL = I915_READ(BLC_PWM_CTL);
322 dev_priv->saveBLC_PWM_CTL2 = I915_READ(BLC_PWM_CTL2);
323 if (IS_MOBILE(dev) && !IS_I830(dev))
324 dev_priv->saveLVDS = I915_READ(LVDS);
325 if (!IS_I830(dev) && !IS_845G(dev))
326 dev_priv->savePFIT_CONTROL = I915_READ(PFIT_CONTROL);
327 dev_priv->saveLVDSPP_ON = I915_READ(LVDSPP_ON);
328 dev_priv->saveLVDSPP_OFF = I915_READ(LVDSPP_OFF);
329 dev_priv->savePP_CYCLE = I915_READ(PP_CYCLE);
331 /* FIXME: save TV & SDVO state */
334 dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE);
335 dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE);
336 dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2);
337 dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL);
339 /* Interrupt state */
340 dev_priv->saveIIR = I915_READ(I915REG_INT_IDENTITY_R);
341 dev_priv->saveIER = I915_READ(I915REG_INT_ENABLE_R);
342 dev_priv->saveIMR = I915_READ(I915REG_INT_MASK_R);
345 dev_priv->saveVCLK_DIVISOR_VGA0 = I915_READ(VCLK_DIVISOR_VGA0);
346 dev_priv->saveVCLK_DIVISOR_VGA1 = I915_READ(VCLK_DIVISOR_VGA1);
347 dev_priv->saveVCLK_POST_DIV = I915_READ(VCLK_POST_DIV);
348 dev_priv->saveVGACNTRL = I915_READ(VGACNTRL);
350 /* Clock gating state */
351 dev_priv->saveDSPCLK_GATE_D = I915_READ(DSPCLK_GATE_D);
353 /* Cache mode state */
354 dev_priv->saveCACHE_MODE_0 = I915_READ(CACHE_MODE_0);
356 /* Memory Arbitration state */
357 dev_priv->saveMI_ARB_STATE = I915_READ(MI_ARB_STATE);
360 for (i = 0; i < 16; i++) {
361 dev_priv->saveSWF0[i] = I915_READ(SWF0 + (i << 2));
362 dev_priv->saveSWF1[i] = I915_READ(SWF10 + (i << 2));
364 for (i = 0; i < 3; i++)
365 dev_priv->saveSWF2[i] = I915_READ(SWF30 + (i << 2));
369 if (state.event == PM_EVENT_SUSPEND) {
370 /* Shut down the device */
371 pci_disable_device(dev->pdev);
372 pci_set_power_state(dev->pdev, PCI_D3hot);
378 static int i915_resume(struct drm_device *dev)
380 struct drm_i915_private *dev_priv = dev->dev_private;
383 pci_set_power_state(dev->pdev, PCI_D0);
384 pci_restore_state(dev->pdev);
385 if (pci_enable_device(dev->pdev))
388 pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB);
390 /* Pipe & plane A info */
391 /* Prime the clock */
392 if (dev_priv->saveDPLL_A & DPLL_VCO_ENABLE) {
393 I915_WRITE(DPLL_A, dev_priv->saveDPLL_A &
397 I915_WRITE(FPA0, dev_priv->saveFPA0);
398 I915_WRITE(FPA1, dev_priv->saveFPA1);
399 /* Actually enable it */
400 I915_WRITE(DPLL_A, dev_priv->saveDPLL_A);
403 I915_WRITE(DPLL_A_MD, dev_priv->saveDPLL_A_MD);
407 I915_WRITE(HTOTAL_A, dev_priv->saveHTOTAL_A);
408 I915_WRITE(HBLANK_A, dev_priv->saveHBLANK_A);
409 I915_WRITE(HSYNC_A, dev_priv->saveHSYNC_A);
410 I915_WRITE(VTOTAL_A, dev_priv->saveVTOTAL_A);
411 I915_WRITE(VBLANK_A, dev_priv->saveVBLANK_A);
412 I915_WRITE(VSYNC_A, dev_priv->saveVSYNC_A);
413 I915_WRITE(BCLRPAT_A, dev_priv->saveBCLRPAT_A);
415 /* Restore plane info */
416 I915_WRITE(DSPASIZE, dev_priv->saveDSPASIZE);
417 I915_WRITE(DSPAPOS, dev_priv->saveDSPAPOS);
418 I915_WRITE(PIPEASRC, dev_priv->savePIPEASRC);
419 I915_WRITE(DSPABASE, dev_priv->saveDSPABASE);
420 I915_WRITE(DSPASTRIDE, dev_priv->saveDSPASTRIDE);
422 I915_WRITE(DSPASURF, dev_priv->saveDSPASURF);
423 I915_WRITE(DSPATILEOFF, dev_priv->saveDSPATILEOFF);
426 I915_WRITE(PIPEACONF, dev_priv->savePIPEACONF);
428 i915_restore_palette(dev, PIPE_A);
429 /* Enable the plane */
430 I915_WRITE(DSPACNTR, dev_priv->saveDSPACNTR);
431 I915_WRITE(DSPABASE, I915_READ(DSPABASE));
433 /* Pipe & plane B info */
434 if (dev_priv->saveDPLL_B & DPLL_VCO_ENABLE) {
435 I915_WRITE(DPLL_B, dev_priv->saveDPLL_B &
439 I915_WRITE(FPB0, dev_priv->saveFPB0);
440 I915_WRITE(FPB1, dev_priv->saveFPB1);
441 /* Actually enable it */
442 I915_WRITE(DPLL_B, dev_priv->saveDPLL_B);
445 I915_WRITE(DPLL_B_MD, dev_priv->saveDPLL_B_MD);
449 I915_WRITE(HTOTAL_B, dev_priv->saveHTOTAL_B);
450 I915_WRITE(HBLANK_B, dev_priv->saveHBLANK_B);
451 I915_WRITE(HSYNC_B, dev_priv->saveHSYNC_B);
452 I915_WRITE(VTOTAL_B, dev_priv->saveVTOTAL_B);
453 I915_WRITE(VBLANK_B, dev_priv->saveVBLANK_B);
454 I915_WRITE(VSYNC_B, dev_priv->saveVSYNC_B);
455 I915_WRITE(BCLRPAT_B, dev_priv->saveBCLRPAT_B);
457 /* Restore plane info */
458 I915_WRITE(DSPBSIZE, dev_priv->saveDSPBSIZE);
459 I915_WRITE(DSPBPOS, dev_priv->saveDSPBPOS);
460 I915_WRITE(PIPEBSRC, dev_priv->savePIPEBSRC);
461 I915_WRITE(DSPBBASE, dev_priv->saveDSPBBASE);
462 I915_WRITE(DSPBSTRIDE, dev_priv->saveDSPBSTRIDE);
464 I915_WRITE(DSPBSURF, dev_priv->saveDSPBSURF);
465 I915_WRITE(DSPBTILEOFF, dev_priv->saveDSPBTILEOFF);
468 I915_WRITE(PIPEBCONF, dev_priv->savePIPEBCONF);
470 i915_restore_palette(dev, PIPE_B);
471 /* Enable the plane */
472 I915_WRITE(DSPBCNTR, dev_priv->saveDSPBCNTR);
473 I915_WRITE(DSPBBASE, I915_READ(DSPBBASE));
476 I915_WRITE(ADPA, dev_priv->saveADPA);
480 I915_WRITE(BLC_PWM_CTL2, dev_priv->saveBLC_PWM_CTL2);
481 if (IS_MOBILE(dev) && !IS_I830(dev))
482 I915_WRITE(LVDS, dev_priv->saveLVDS);
483 if (!IS_I830(dev) && !IS_845G(dev))
484 I915_WRITE(PFIT_CONTROL, dev_priv->savePFIT_CONTROL);
486 I915_WRITE(PFIT_PGM_RATIOS, dev_priv->savePFIT_PGM_RATIOS);
487 I915_WRITE(BLC_PWM_CTL, dev_priv->saveBLC_PWM_CTL);
488 I915_WRITE(LVDSPP_ON, dev_priv->saveLVDSPP_ON);
489 I915_WRITE(LVDSPP_OFF, dev_priv->saveLVDSPP_OFF);
490 I915_WRITE(PP_CYCLE, dev_priv->savePP_CYCLE);
491 I915_WRITE(PP_CONTROL, dev_priv->savePP_CONTROL);
493 /* FIXME: restore TV & SDVO state */
496 I915_WRITE(FBC_CFB_BASE, dev_priv->saveFBC_CFB_BASE);
497 I915_WRITE(FBC_LL_BASE, dev_priv->saveFBC_LL_BASE);
498 I915_WRITE(FBC_CONTROL2, dev_priv->saveFBC_CONTROL2);
499 I915_WRITE(FBC_CONTROL, dev_priv->saveFBC_CONTROL);
502 I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL);
503 I915_WRITE(VCLK_DIVISOR_VGA0, dev_priv->saveVCLK_DIVISOR_VGA0);
504 I915_WRITE(VCLK_DIVISOR_VGA1, dev_priv->saveVCLK_DIVISOR_VGA1);
505 I915_WRITE(VCLK_POST_DIV, dev_priv->saveVCLK_POST_DIV);
508 /* Clock gating state */
509 I915_WRITE (DSPCLK_GATE_D, dev_priv->saveDSPCLK_GATE_D);
511 /* Cache mode state */
512 I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
514 /* Memory arbitration state */
515 I915_WRITE (MI_ARB_STATE, dev_priv->saveMI_ARB_STATE | 0xffff0000);
517 for (i = 0; i < 16; i++) {
518 I915_WRITE(SWF0 + (i << 2), dev_priv->saveSWF0[i]);
519 I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]);
521 for (i = 0; i < 3; i++)
522 I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]);
524 i915_restore_vga(dev);
529 static struct drm_driver driver = {
530 /* don't use mtrr's here, the Xserver or user space app should
531 * deal with them for intel hardware.
534 DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/
535 DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL |
537 .load = i915_driver_load,
538 .unload = i915_driver_unload,
539 .lastclose = i915_driver_lastclose,
540 .preclose = i915_driver_preclose,
541 .suspend = i915_suspend,
542 .resume = i915_resume,
543 .device_is_agp = i915_driver_device_is_agp,
544 .vblank_wait = i915_driver_vblank_wait,
545 .vblank_wait2 = i915_driver_vblank_wait2,
546 .irq_preinstall = i915_driver_irq_preinstall,
547 .irq_postinstall = i915_driver_irq_postinstall,
548 .irq_uninstall = i915_driver_irq_uninstall,
549 .irq_handler = i915_driver_irq_handler,
550 .reclaim_buffers = drm_core_reclaim_buffers,
551 .get_map_ofs = drm_core_get_map_ofs,
552 .get_reg_ofs = drm_core_get_reg_ofs,
553 .ioctls = i915_ioctls,
555 .owner = THIS_MODULE,
557 .release = drm_release,
561 .fasync = drm_fasync,
563 .compat_ioctl = i915_compat_ioctl,
569 .id_table = pciidlist,
575 .major = DRIVER_MAJOR,
576 .minor = DRIVER_MINOR,
577 .patchlevel = DRIVER_PATCHLEVEL,
580 static int __init i915_init(void)
582 driver.num_ioctls = i915_max_ioctl;
583 return drm_init(&driver);
586 static void __exit i915_exit(void)
591 module_init(i915_init);
592 module_exit(i915_exit);
594 MODULE_AUTHOR(DRIVER_AUTHOR);
595 MODULE_DESCRIPTION(DRIVER_DESC);
596 MODULE_LICENSE("GPL and additional rights");