int *burst, int *lwm)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        struct nv_fifo_info fifo_data;
        struct nv_sim_state sim_data;
        int MClk = nouveau_hw_get_clock(dev, PLL_MEMORY);
                sim_data.mem_page_miss = ((cfg1 >> 4) & 0xf) + ((cfg1 >> 31) & 0x1);
        }
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_TNT)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_TNT)
                nv04_calc_arb(&fifo_data, &sim_data);
        else
                nv10_calc_arb(&fifo_data, &sim_data);
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
 
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_KELVIN)
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_KELVIN)
                nv04_update_arb(dev, vclk, bpp, burst, lwm);
        else if ((dev->pdev->device & 0xfff0) == 0x0240 /*CHIPSET_C51*/ ||
                 (dev->pdev->device & 0xfff0) == 0x03d0 /*CHIPSET_C512*/) {
 
 {
        struct drm_device *dev = crtc->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_bios *bios = nvxx_bios(&drm->device);
-       struct nvkm_clk *clk = nvxx_clk(&drm->device);
+       struct nvkm_bios *bios = nvxx_bios(&drm->client.device);
+       struct nvkm_clk *clk = nvxx_clk(&drm->client.device);
        struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
        struct nv04_mode_state *state = &nv04_display(dev)->mode_reg;
        struct nv04_crtc_reg *regp = &state->crtc_reg[nv_crtc->index];
         * has yet been observed in allowing the use a single stage pll on all
         * nv43 however.  the behaviour of single stage use is untested on nv40
         */
-       if (drm->device.info.chipset > 0x40 && dot_clock <= (pll_lim.vco1.max_freq / 2))
+       if (drm->client.device.info.chipset > 0x40 && dot_clock <= (pll_lim.vco1.max_freq / 2))
                memset(&pll_lim.vco2, 0, sizeof(pll_lim.vco2));
 
 
        state->pllsel &= PLLSEL_VPLL1_MASK | PLLSEL_VPLL2_MASK | PLLSEL_TV_MASK;
 
        /* The blob uses this always, so let's do the same */
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                state->pllsel |= NV_PRAMDAC_PLL_COEFF_SELECT_USE_VPLL2_TRUE;
        /* again nv40 and some nv43 act more like nv3x as described above */
-       if (drm->device.info.chipset < 0x41)
+       if (drm->client.device.info.chipset < 0x41)
                state->pllsel |= NV_PRAMDAC_PLL_COEFF_SELECT_SOURCE_PROG_MPLL |
                                 NV_PRAMDAC_PLL_COEFF_SELECT_SOURCE_PROG_NVPLL;
        state->pllsel |= nv_crtc->index ? PLLSEL_VPLL2_MASK : PLLSEL_VPLL1_MASK;
                horizEnd = horizTotal - 2;
                horizBlankEnd = horizTotal + 4;
 #if 0
-               if (dev->overlayAdaptor && drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
+               if (dev->overlayAdaptor && drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
                        /* This reportedly works around some video overlay bandwidth problems */
                        horizTotal += 2;
 #endif
        regp->cursor_cfg = NV_PCRTC_CURSOR_CONFIG_CUR_LINES_64 |
                             NV_PCRTC_CURSOR_CONFIG_CUR_PIXELS_64 |
                             NV_PCRTC_CURSOR_CONFIG_ADDRESS_SPACE_PNVM;
-       if (drm->device.info.chipset >= 0x11)
+       if (drm->client.device.info.chipset >= 0x11)
                regp->cursor_cfg |= NV_PCRTC_CURSOR_CONFIG_CUR_BPP_32;
        if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
                regp->cursor_cfg |= NV_PCRTC_CURSOR_CONFIG_DOUBLE_SCAN_ENABLE;
         * 1 << 30 on 0x60.830), for no apparent reason */
        regp->CRTC[NV_CIO_CRE_59] = off_chip_digital;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
                regp->CRTC[0x9f] = off_chip_digital ? 0x11 : 0x1;
 
        regp->crtc_830 = mode->crtc_vdisplay - 3;
        regp->crtc_834 = mode->crtc_vdisplay - 1;
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                /* This is what the blob does */
                regp->crtc_850 = NVReadCRTC(dev, 0, NV_PCRTC_850);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
                regp->gpio_ext = NVReadCRTC(dev, 0, NV_PCRTC_GPIO_EXT);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
                regp->crtc_cfg = NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC;
        else
                regp->crtc_cfg = NV04_PCRTC_CONFIG_START_ADDRESS_HSYNC;
 
        /* Some misc regs */
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE) {
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE) {
                regp->CRTC[NV_CIO_CRE_85] = 0xFF;
                regp->CRTC[NV_CIO_CRE_86] = 0x1;
        }
 
        /* Generic PRAMDAC regs */
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
                /* Only bit that bios and blob set. */
                regp->nv10_cursync = (1 << 25);
 
                                NV_PRAMDAC_GENERAL_CONTROL_PIXMIX_ON;
        if (fb->format->depth == 16)
                regp->ramdac_gen_ctrl |= NV_PRAMDAC_GENERAL_CONTROL_ALT_MODE_SEL;
-       if (drm->device.info.chipset >= 0x11)
+       if (drm->client.device.info.chipset >= 0x11)
                regp->ramdac_gen_ctrl |= NV_PRAMDAC_GENERAL_CONTROL_PIPE_LONG;
 
        regp->ramdac_630 = 0; /* turn off green mode (tv test pattern?) */
 
        nv_crtc_mode_set_vga(crtc, adjusted_mode);
        /* calculated in nv04_dfp_prepare, nv40 needs it written before calculating PLLs */
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                NVWriteRAMDAC(dev, 0, NV_PRAMDAC_SEL_CLK, nv04_display(dev)->mode_reg.sel_clk);
        nv_crtc_mode_set_regs(crtc, adjusted_mode);
        nv_crtc_calc_state_ext(crtc, mode, adjusted_mode->clock);
 
        /* Some more preparation. */
        NVWriteCRTC(dev, nv_crtc->index, NV_PCRTC_CONFIG, NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA);
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE) {
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE) {
                uint32_t reg900 = NVReadRAMDAC(dev, nv_crtc->index, NV_PRAMDAC_900);
                NVWriteRAMDAC(dev, nv_crtc->index, NV_PRAMDAC_900, reg900 & ~0x10000);
        }
        crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_FF_INDEX);
        crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_FFLWM__INDEX);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_KELVIN) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_KELVIN) {
                regp->CRTC[NV_CIO_CRE_47] = arb_lwm >> 8;
                crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_47);
        }
                {
                        struct nouveau_drm *drm = nouveau_drm(dev);
 
-                       if (drm->device.info.chipset == 0x11) {
+                       if (drm->client.device.info.chipset == 0x11) {
                                pixel = ((pixel & 0x000000ff) << 24) |
                                        ((pixel & 0x0000ff00) << 8) |
                                        ((pixel & 0x00ff0000) >> 8) |
        if (ret)
                goto out;
 
-       if (drm->device.info.chipset >= 0x11)
+       if (drm->client.device.info.chipset >= 0x11)
                nv11_cursor_upload(dev, cursor, nv_crtc->cursor.nvbo);
        else
                nv04_cursor_upload(dev, cursor, nv_crtc->cursor.nvbo);
 
        crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_HCUR_ADDR0_INDEX);
        crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_HCUR_ADDR1_INDEX);
        crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_HCUR_ADDR2_INDEX);
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                nv_fix_nv40_hw_cursor(dev, nv_crtc->index);
 }
 
 
 static int sample_load_twice(struct drm_device *dev, bool sense[2])
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        int i;
 
        for (i = 0; i < 2; i++) {
                 * use a 10ms timeout (guards against crtc being inactive, in
                 * which case blank state would never change)
                 */
-               if (nvif_msec(&drm->device, 10,
+               if (nvif_msec(&drm->client.device, 10,
                        if (!(nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1))
                                break;
                ) < 0)
                        return -EBUSY;
 
-               if (nvif_msec(&drm->device, 10,
+               if (nvif_msec(&drm->client.device, 10,
                        if ( (nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1))
                                break;
                ) < 0)
                        return -EBUSY;
 
-               if (nvif_msec(&drm->device, 10,
+               if (nvif_msec(&drm->client.device, 10,
                        if (!(nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1))
                                break;
                ) < 0)
                                                 struct drm_connector *connector)
 {
        struct drm_device *dev = encoder->dev;
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        struct nouveau_drm *drm = nouveau_drm(dev);
        uint8_t saved_seq1, saved_pi, saved_rpc1, saved_cr_mode;
        uint8_t saved_palette0[3], saved_palette_mask;
 {
        struct drm_device *dev = encoder->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
-       struct nvkm_gpio *gpio = nvxx_gpio(&drm->device);
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
+       struct nvkm_gpio *gpio = nvxx_gpio(&drm->client.device);
        struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
        uint32_t sample, testval, regoffset = nv04_dac_output_offset(encoder);
        uint32_t saved_powerctrl_2 = 0, saved_powerctrl_4 = 0, saved_routput,
        /* nv driver and nv31 use 0xfffffeee, nv34 and 6600 use 0xfffffece */
        routput = (saved_routput & 0xfffffece) | head << 8;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CURIE) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CURIE) {
                if (dcb->type == DCB_OUTPUT_TV)
                        routput |= 0x1a << 16;
                else
        }
 
        /* This could use refinement for flatpanels, but it should work this way */
-       if (drm->device.info.chipset < 0x44)
+       if (drm->client.device.info.chipset < 0x44)
                NVWriteRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + nv04_dac_output_offset(encoder), 0xf0000000);
        else
                NVWriteRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + nv04_dac_output_offset(encoder), 0x00100000);
 
                              struct drm_display_mode *adjusted_mode)
 {
        struct drm_device *dev = encoder->dev;
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
        struct nv04_crtc_reg *regp = &nv04_display(dev)->mode_reg.crtc_reg[nv_crtc->index];
        if ((nv_connector->dithering_mode == DITHERING_MODE_ON) ||
            (nv_connector->dithering_mode == DITHERING_MODE_AUTO &&
             fb->format->depth > connector->display_info.bpc * 3)) {
-               if (drm->device.info.chipset == 0x11)
+               if (drm->client.device.info.chipset == 0x11)
                        regp->dither = savep->dither | 0x00010000;
                else {
                        int i;
                        }
                }
        } else {
-               if (drm->device.info.chipset != 0x11) {
+               if (drm->client.device.info.chipset != 0x11) {
                        /* reset them */
                        int i;
                        for (i = 0; i < 3; i++) {
                NVReadRAMDAC(dev, head, NV_PRAMDAC_FP_TG_CONTROL);
 
        /* This could use refinement for flatpanels, but it should work this way */
-       if (drm->device.info.chipset < 0x44)
+       if (drm->client.device.info.chipset < 0x44)
                NVWriteRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + nv04_dac_output_offset(encoder), 0xf0000000);
        else
                NVWriteRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + nv04_dac_output_offset(encoder), 0x00100000);
 {
 #ifdef __powerpc__
        struct drm_device *dev = encoder->dev;
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
 
        /* BIOS scripts usually take care of the backlight, thanks
         * Apple for your consistency.
        struct drm_device *dev = encoder->dev;
        struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
        struct nvkm_i2c_bus *bus = nvkm_i2c_bus_find(i2c, NVKM_I2C_BUS_PRI);
        struct nvkm_i2c_bus_probe info[] = {
                {
 
 nv04_display_create(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
        struct dcb_table *dcb = &drm->vbios.dcb;
        struct drm_connector *connector, *ct;
        struct drm_encoder *encoder;
        if (!disp)
                return -ENOMEM;
 
-       nvif_object_map(&drm->device.object);
+       nvif_object_map(&drm->client.device.object);
 
        nouveau_display(dev)->priv = disp;
        nouveau_display(dev)->dtor = nv04_display_destroy;
        nouveau_display(dev)->priv = NULL;
        kfree(disp);
 
-       nvif_object_unmap(&drm->device.object);
+       nvif_object_unmap(&drm->client.device.object);
 }
 
 int
 
        struct nouveau_drm *drm = nouveau_drm(dev);
        const int impl = dev->pdev->device & 0x0ff0;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS && impl != 0x0100 &&
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS && impl != 0x0100 &&
            impl != 0x0150 && impl != 0x01a0 && impl != 0x0200)
                return true;
 
        struct nouveau_drm *drm = nouveau_drm(dev);
        const int impl = dev->pdev->device & 0x0ff0;
 
-       if (impl == 0x0310 || impl == 0x0340 || drm->device.info.family >= NV_DEVICE_INFO_V0_CURIE)
+       if (impl == 0x0310 || impl == 0x0340 || drm->client.device.info.family >= NV_DEVICE_INFO_V0_CURIE)
                return true;
        return false;
 }
                            struct dcb_output *outp, int crtc)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_bios *bios = nvxx_bios(&drm->device);
+       struct nvkm_bios *bios = nvxx_bios(&drm->client.device);
        struct nvbios_init init = {
                .subdev = &bios->subdev,
                .bios = bios,
 
        if (owner == 1)
                owner *= 3;
 
-       if (drm->device.info.chipset == 0x11) {
+       if (drm->client.device.info.chipset == 0x11) {
                /* This might seem stupid, but the blob does it and
                 * omitting it often locks the system up.
                 */
        /* CR44 is always changed on CRTC0 */
        NVWriteVgaCrtc(dev, 0, NV_CIO_CRE_44, owner);
 
-       if (drm->device.info.chipset == 0x11) { /* set me harder */
+       if (drm->client.device.info.chipset == 0x11) {  /* set me harder */
                NVWriteVgaCrtc(dev, 0, NV_CIO_CRE_2E, owner);
                NVWriteVgaCrtc(dev, 0, NV_CIO_CRE_2E, owner);
        }
                pllvals->NM1 = pll1 & 0xffff;
                if (nv_two_reg_pll(dev) && pll2 & NV31_RAMDAC_ENABLE_VCO2)
                        pllvals->NM2 = pll2 & 0xffff;
-               else if (drm->device.info.chipset == 0x30 || drm->device.info.chipset == 0x35) {
+               else if (drm->client.device.info.chipset == 0x30 || drm->client.device.info.chipset == 0x35) {
                        pllvals->M1 &= 0xf; /* only 4 bits */
                        if (pll1 & NV30_RAMDAC_ENABLE_VCO2) {
                                pllvals->M2 = (pll1 >> 4) & 0x7;
                       struct nvkm_pll_vals *pllvals)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &drm->device.object;
-       struct nvkm_bios *bios = nvxx_bios(&drm->device);
+       struct nvif_object *device = &drm->client.device.object;
+       struct nvkm_bios *bios = nvxx_bios(&drm->client.device);
        uint32_t reg1, pll1, pll2 = 0;
        struct nvbios_pll pll_lim;
        int ret;
                pll2 = nvif_rd32(device, reg2);
        }
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CELSIUS && reg1 >= NV_PRAMDAC_VPLL_COEFF) {
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CELSIUS && reg1 >= NV_PRAMDAC_VPLL_COEFF) {
                uint32_t ramdac580 = NVReadRAMDAC(dev, 0, NV_PRAMDAC_580);
 
                /* check whether vpll has been forced into single stage mode */
         */
 
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        struct nvkm_clk *clk = nvxx_clk(device);
        struct nvkm_bios *bios = nvxx_bios(device);
        struct nvbios_pll pll_lim;
        struct nv04_crtc_reg *regp = &state->crtc_reg[head];
        int i;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
                regp->nv10_cursync = NVReadRAMDAC(dev, head, NV_RAMDAC_NV10_CURSYNC);
 
        nouveau_hw_get_pllvals(dev, head ? PLL_VPLL1 : PLL_VPLL0, ®p->pllvals);
        state->pllsel = NVReadRAMDAC(dev, 0, NV_PRAMDAC_PLL_COEFF_SELECT);
        if (nv_two_heads(dev))
                state->sel_clk = NVReadRAMDAC(dev, 0, NV_PRAMDAC_SEL_CLK);
-       if (drm->device.info.chipset == 0x11)
+       if (drm->client.device.info.chipset == 0x11)
                regp->dither = NVReadRAMDAC(dev, head, NV_RAMDAC_DITHER_NV11);
 
        regp->ramdac_gen_ctrl = NVReadRAMDAC(dev, head, NV_PRAMDAC_GENERAL_CONTROL);
 
        if (nv_gf4_disp_arch(dev))
                regp->ramdac_630 = NVReadRAMDAC(dev, head, NV_PRAMDAC_630);
-       if (drm->device.info.chipset >= 0x30)
+       if (drm->client.device.info.chipset >= 0x30)
                regp->ramdac_634 = NVReadRAMDAC(dev, head, NV_PRAMDAC_634);
 
        regp->tv_setup = NVReadRAMDAC(dev, head, NV_PRAMDAC_TV_SETUP);
        if (nv_gf4_disp_arch(dev))
                regp->ramdac_8c0 = NVReadRAMDAC(dev, head, NV_PRAMDAC_8C0);
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE) {
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE) {
                regp->ramdac_a20 = NVReadRAMDAC(dev, head, NV_PRAMDAC_A20);
                regp->ramdac_a24 = NVReadRAMDAC(dev, head, NV_PRAMDAC_A24);
                regp->ramdac_a34 = NVReadRAMDAC(dev, head, NV_PRAMDAC_A34);
                     struct nv04_mode_state *state)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_clk *clk = nvxx_clk(&drm->device);
+       struct nvkm_clk *clk = nvxx_clk(&drm->client.device);
        struct nv04_crtc_reg *regp = &state->crtc_reg[head];
        uint32_t pllreg = head ? NV_RAMDAC_VPLL2 : NV_PRAMDAC_VPLL_COEFF;
        int i;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
                NVWriteRAMDAC(dev, head, NV_RAMDAC_NV10_CURSYNC, regp->nv10_cursync);
 
        clk->pll_prog(clk, pllreg, ®p->pllvals);
        NVWriteRAMDAC(dev, 0, NV_PRAMDAC_PLL_COEFF_SELECT, state->pllsel);
        if (nv_two_heads(dev))
                NVWriteRAMDAC(dev, 0, NV_PRAMDAC_SEL_CLK, state->sel_clk);
-       if (drm->device.info.chipset == 0x11)
+       if (drm->client.device.info.chipset == 0x11)
                NVWriteRAMDAC(dev, head, NV_RAMDAC_DITHER_NV11, regp->dither);
 
        NVWriteRAMDAC(dev, head, NV_PRAMDAC_GENERAL_CONTROL, regp->ramdac_gen_ctrl);
 
        if (nv_gf4_disp_arch(dev))
                NVWriteRAMDAC(dev, head, NV_PRAMDAC_630, regp->ramdac_630);
-       if (drm->device.info.chipset >= 0x30)
+       if (drm->client.device.info.chipset >= 0x30)
                NVWriteRAMDAC(dev, head, NV_PRAMDAC_634, regp->ramdac_634);
 
        NVWriteRAMDAC(dev, head, NV_PRAMDAC_TV_SETUP, regp->tv_setup);
        if (nv_gf4_disp_arch(dev))
                NVWriteRAMDAC(dev, head, NV_PRAMDAC_8C0, regp->ramdac_8c0);
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE) {
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE) {
                NVWriteRAMDAC(dev, head, NV_PRAMDAC_A20, regp->ramdac_a20);
                NVWriteRAMDAC(dev, head, NV_PRAMDAC_A24, regp->ramdac_a24);
                NVWriteRAMDAC(dev, head, NV_PRAMDAC_A34, regp->ramdac_a34);
        rd_cio_state(dev, head, regp, NV_CIO_CRE_FFLWM__INDEX);
        rd_cio_state(dev, head, regp, NV_CIO_CRE_21);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_KELVIN)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_KELVIN)
                rd_cio_state(dev, head, regp, NV_CIO_CRE_47);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
                rd_cio_state(dev, head, regp, 0x9f);
 
        rd_cio_state(dev, head, regp, NV_CIO_CRE_49);
        rd_cio_state(dev, head, regp, NV_CIO_CRE_HCUR_ADDR2_INDEX);
        rd_cio_state(dev, head, regp, NV_CIO_CRE_ILACE__INDEX);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
                regp->crtc_830 = NVReadCRTC(dev, head, NV_PCRTC_830);
                regp->crtc_834 = NVReadCRTC(dev, head, NV_PCRTC_834);
 
-               if (drm->device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
+               if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
                        regp->gpio_ext = NVReadCRTC(dev, head, NV_PCRTC_GPIO_EXT);
 
-               if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+               if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                        regp->crtc_850 = NVReadCRTC(dev, head, NV_PCRTC_850);
 
                if (nv_two_heads(dev))
 
        rd_cio_state(dev, head, regp, NV_CIO_CRE_SCRATCH3__INDEX);
        rd_cio_state(dev, head, regp, NV_CIO_CRE_SCRATCH4__INDEX);
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
                rd_cio_state(dev, head, regp, NV_CIO_CRE_EBR_INDEX);
                rd_cio_state(dev, head, regp, NV_CIO_CRE_CSB);
                rd_cio_state(dev, head, regp, NV_CIO_CRE_4B);
                  struct nv04_mode_state *state)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        struct nv04_crtc_reg *regp = &state->crtc_reg[head];
        uint32_t reg900;
        int i;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
                if (nv_two_heads(dev))
                        /* setting ENGINE_CTRL (EC) *must* come before
                         * CIO_CRE_LCD, as writing CRE_LCD sets bits 16 & 17 in
                nvif_wr32(device, NV_PVIDEO_INTR_EN, 0);
                nvif_wr32(device, NV_PVIDEO_OFFSET_BUFF(0), 0);
                nvif_wr32(device, NV_PVIDEO_OFFSET_BUFF(1), 0);
-               nvif_wr32(device, NV_PVIDEO_LIMIT(0), drm->device.info.ram_size - 1);
-               nvif_wr32(device, NV_PVIDEO_LIMIT(1), drm->device.info.ram_size - 1);
-               nvif_wr32(device, NV_PVIDEO_UVPLANE_LIMIT(0), drm->device.info.ram_size - 1);
-               nvif_wr32(device, NV_PVIDEO_UVPLANE_LIMIT(1), drm->device.info.ram_size - 1);
+               nvif_wr32(device, NV_PVIDEO_LIMIT(0), drm->client.device.info.ram_size - 1);
+               nvif_wr32(device, NV_PVIDEO_LIMIT(1), drm->client.device.info.ram_size - 1);
+               nvif_wr32(device, NV_PVIDEO_UVPLANE_LIMIT(0), drm->client.device.info.ram_size - 1);
+               nvif_wr32(device, NV_PVIDEO_UVPLANE_LIMIT(1), drm->client.device.info.ram_size - 1);
                nvif_wr32(device, NV_PBUS_POWERCTRL_2, 0);
 
                NVWriteCRTC(dev, head, NV_PCRTC_CURSOR_CONFIG, regp->cursor_cfg);
                NVWriteCRTC(dev, head, NV_PCRTC_830, regp->crtc_830);
                NVWriteCRTC(dev, head, NV_PCRTC_834, regp->crtc_834);
 
-               if (drm->device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
+               if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
                        NVWriteCRTC(dev, head, NV_PCRTC_GPIO_EXT, regp->gpio_ext);
 
-               if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE) {
+               if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE) {
                        NVWriteCRTC(dev, head, NV_PCRTC_850, regp->crtc_850);
 
                        reg900 = NVReadRAMDAC(dev, head, NV_PRAMDAC_900);
        wr_cio_state(dev, head, regp, NV_CIO_CRE_FF_INDEX);
        wr_cio_state(dev, head, regp, NV_CIO_CRE_FFLWM__INDEX);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_KELVIN)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_KELVIN)
                wr_cio_state(dev, head, regp, NV_CIO_CRE_47);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_RANKINE)
                wr_cio_state(dev, head, regp, 0x9f);
 
        wr_cio_state(dev, head, regp, NV_CIO_CRE_49);
        wr_cio_state(dev, head, regp, NV_CIO_CRE_HCUR_ADDR0_INDEX);
        wr_cio_state(dev, head, regp, NV_CIO_CRE_HCUR_ADDR1_INDEX);
        wr_cio_state(dev, head, regp, NV_CIO_CRE_HCUR_ADDR2_INDEX);
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                nv_fix_nv40_hw_cursor(dev, head);
        wr_cio_state(dev, head, regp, NV_CIO_CRE_ILACE__INDEX);
 
        wr_cio_state(dev, head, regp, NV_CIO_CRE_SCRATCH3__INDEX);
        wr_cio_state(dev, head, regp, NV_CIO_CRE_SCRATCH4__INDEX);
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
                wr_cio_state(dev, head, regp, NV_CIO_CRE_EBR_INDEX);
                wr_cio_state(dev, head, regp, NV_CIO_CRE_CSB);
                wr_cio_state(dev, head, regp, NV_CIO_CRE_4B);
        }
        /* NV11 and NV20 stop at 0x52. */
        if (nv_gf4_disp_arch(dev)) {
-               if (drm->device.info.family < NV_DEVICE_INFO_V0_KELVIN) {
+               if (drm->client.device.info.family < NV_DEVICE_INFO_V0_KELVIN) {
                        /* Not waiting for vertical retrace before modifying
                           CRE_53/CRE_54 causes lockups. */
-                       nvif_msec(&drm->device, 650,
+                       nvif_msec(&drm->client.device, 650,
                                if ( (nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 8))
                                        break;
                        );
-                       nvif_msec(&drm->device, 650,
+                       nvif_msec(&drm->client.device, 650,
                                if (!(nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 8))
                                        break;
                        );
 nv_save_state_palette(struct drm_device *dev, int head,
                      struct nv04_mode_state *state)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        int head_offset = head * NV_PRMDIO_SIZE, i;
 
        nvif_wr08(device, NV_PRMDIO_PIXEL_MASK + head_offset,
 nouveau_hw_load_state_palette(struct drm_device *dev, int head,
                              struct nv04_mode_state *state)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        int head_offset = head * NV_PRMDIO_SIZE, i;
 
        nvif_wr08(device, NV_PRMDIO_PIXEL_MASK + head_offset,
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
 
-       if (drm->device.info.chipset == 0x11)
+       if (drm->client.device.info.chipset == 0x11)
                /* NB: no attempt is made to restore the bad pll later on */
                nouveau_hw_fix_bad_vpll(dev, head);
        nv_save_state_ramdac(dev, head, state);
 
 static inline uint32_t NVReadCRTC(struct drm_device *dev,
                                        int head, uint32_t reg)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        uint32_t val;
        if (head)
                reg += NV_PCRTC0_SIZE;
 static inline void NVWriteCRTC(struct drm_device *dev,
                                        int head, uint32_t reg, uint32_t val)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        if (head)
                reg += NV_PCRTC0_SIZE;
        nvif_wr32(device, reg, val);
 static inline uint32_t NVReadRAMDAC(struct drm_device *dev,
                                        int head, uint32_t reg)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        uint32_t val;
        if (head)
                reg += NV_PRAMDAC0_SIZE;
 static inline void NVWriteRAMDAC(struct drm_device *dev,
                                        int head, uint32_t reg, uint32_t val)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        if (head)
                reg += NV_PRAMDAC0_SIZE;
        nvif_wr32(device, reg, val);
 static inline void NVWriteVgaCrtc(struct drm_device *dev,
                                        int head, uint8_t index, uint8_t value)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        nvif_wr08(device, NV_PRMCIO_CRX__COLOR + head * NV_PRMCIO_SIZE, index);
        nvif_wr08(device, NV_PRMCIO_CR__COLOR + head * NV_PRMCIO_SIZE, value);
 }
 static inline uint8_t NVReadVgaCrtc(struct drm_device *dev,
                                        int head, uint8_t index)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        uint8_t val;
        nvif_wr08(device, NV_PRMCIO_CRX__COLOR + head * NV_PRMCIO_SIZE, index);
        val = nvif_rd08(device, NV_PRMCIO_CR__COLOR + head * NV_PRMCIO_SIZE);
 static inline uint8_t NVReadPRMVIO(struct drm_device *dev,
                                        int head, uint32_t reg)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        struct nouveau_drm *drm = nouveau_drm(dev);
        uint8_t val;
 
        /* Only NV4x have two pvio ranges; other twoHeads cards MUST call
         * NVSetOwner for the relevant head to be programmed */
-       if (head && drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (head && drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                reg += NV_PRMVIO_SIZE;
 
        val = nvif_rd08(device, reg);
 static inline void NVWritePRMVIO(struct drm_device *dev,
                                        int head, uint32_t reg, uint8_t value)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        struct nouveau_drm *drm = nouveau_drm(dev);
 
        /* Only NV4x have two pvio ranges; other twoHeads cards MUST call
         * NVSetOwner for the relevant head to be programmed */
-       if (head && drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (head && drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                reg += NV_PRMVIO_SIZE;
 
        nvif_wr08(device, reg, value);
 
 static inline void NVSetEnablePalette(struct drm_device *dev, int head, bool enable)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        nvif_rd08(device, NV_PRMCIO_INP0__COLOR + head * NV_PRMCIO_SIZE);
        nvif_wr08(device, NV_PRMCIO_ARX + head * NV_PRMCIO_SIZE, enable ? 0 : 0x20);
 }
 
 static inline bool NVGetEnablePalette(struct drm_device *dev, int head)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        nvif_rd08(device, NV_PRMCIO_INP0__COLOR + head * NV_PRMCIO_SIZE);
        return !(nvif_rd08(device, NV_PRMCIO_ARX + head * NV_PRMCIO_SIZE) & 0x20);
 }
 static inline void NVWriteVgaAttr(struct drm_device *dev,
                                        int head, uint8_t index, uint8_t value)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        if (NVGetEnablePalette(dev, head))
                index &= ~0x20;
        else
 static inline uint8_t NVReadVgaAttr(struct drm_device *dev,
                                        int head, uint8_t index)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        uint8_t val;
        if (NVGetEnablePalette(dev, head))
                index &= ~0x20;
 static inline bool
 nv_heads_tied(struct drm_device *dev)
 {
-       struct nvif_object *device = &nouveau_drm(dev)->device.object;
+       struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
        struct nouveau_drm *drm = nouveau_drm(dev);
 
-       if (drm->device.info.chipset == 0x11)
+       if (drm->client.device.info.chipset == 0x11)
                return !!(nvif_rd32(device, NV_PBUS_DEBUG_1) & (1 << 28));
 
        return NVReadVgaCrtc(dev, 0, NV_CIO_CRE_44) & 0x4;
        NVWriteVgaCrtc(dev, 0, NV_CIO_SR_LOCK_INDEX,
                       lock ? NV_CIO_SR_LOCK_VALUE : NV_CIO_SR_UNLOCK_RW_VALUE);
        /* NV11 has independently lockable extended crtcs, except when tied */
-       if (drm->device.info.chipset == 0x11 && !nv_heads_tied(dev))
+       if (drm->client.device.info.chipset == 0x11 && !nv_heads_tied(dev))
                NVWriteVgaCrtc(dev, 1, NV_CIO_SR_LOCK_INDEX,
                               lock ? NV_CIO_SR_LOCK_VALUE :
                                      NV_CIO_SR_UNLOCK_RW_VALUE);
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
 
-       return drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS ? NV10_CURSOR_SIZE : NV04_CURSOR_SIZE;
+       return drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS ? NV10_CURSOR_SIZE : NV04_CURSOR_SIZE;
 }
 
 static inline void
 
        NVWriteCRTC(dev, head, NV_PCRTC_START, offset);
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_TNT) {
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_TNT) {
                /*
                 * Hilarious, the 24th bit doesn't want to stick to
                 * PCRTC_START...
                *curctl1 &= ~MASK(NV_CIO_CRE_HCUR_ADDR1_ENABLE);
        NVWriteVgaCrtc(dev, head, NV_CIO_CRE_HCUR_ADDR1_INDEX, *curctl1);
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                nv_fix_nv40_hw_cursor(dev, head);
 }
 
                bpp = 8;
 
        /* Alignment requirements taken from the Haiku driver */
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_TNT)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_TNT)
                mask = 128 / bpp - 1;
        else
                mask = 512 / bpp - 1;
 
                  uint32_t src_w, uint32_t src_h)
 {
        struct nouveau_drm *drm = nouveau_drm(plane->dev);
-       struct nvif_object *dev = &drm->device.object;
+       struct nvif_object *dev = &drm->client.device.object;
        struct nouveau_plane *nv_plane =
                container_of(plane, struct nouveau_plane, base);
        struct nouveau_framebuffer *nv_fb = nouveau_framebuffer(fb);
        if (format > 0xffff)
                return -ERANGE;
 
-       if (drm->device.info.chipset >= 0x30) {
+       if (drm->client.device.info.chipset >= 0x30) {
                if (crtc_w < (src_w >> 1) || crtc_h < (src_h >> 1))
                        return -ERANGE;
        } else {
 static int
 nv10_disable_plane(struct drm_plane *plane)
 {
-       struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object;
+       struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
        struct nouveau_plane *nv_plane =
                container_of(plane, struct nouveau_plane, base);
 
 static void
 nv10_set_params(struct nouveau_plane *plane)
 {
-       struct nvif_object *dev = &nouveau_drm(plane->base.dev)->device.object;
+       struct nvif_object *dev = &nouveau_drm(plane->base.dev)->client.device.object;
        u32 luma = (plane->brightness - 512) << 16 | plane->contrast;
        u32 chroma = ((sin_mul(plane->hue, plane->saturation) & 0xffff) << 16) |
                (cos_mul(plane->hue, plane->saturation) & 0xffff);
        if (!plane)
                return;
 
-       switch (drm->device.info.chipset) {
+       switch (drm->client.device.info.chipset) {
        case 0x10:
        case 0x11:
        case 0x15:
                  uint32_t src_x, uint32_t src_y,
                  uint32_t src_w, uint32_t src_h)
 {
-       struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object;
+       struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
        struct nouveau_plane *nv_plane =
                container_of(plane, struct nouveau_plane, base);
        struct nouveau_framebuffer *nv_fb = nouveau_framebuffer(fb);
 static int
 nv04_disable_plane(struct drm_plane *plane)
 {
-       struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object;
+       struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
        struct nouveau_plane *nv_plane =
                container_of(plane, struct nouveau_plane, base);
 
 void
 nouveau_overlay_init(struct drm_device *device)
 {
-       struct nvif_device *dev = &nouveau_drm(device)->device;
+       struct nvif_device *dev = &nouveau_drm(device)->client.device;
        if (dev->info.chipset < 0x10)
                nv04_overlay_init(device);
        else if (dev->info.chipset <= 0x40)
 
 int nv04_tv_identify(struct drm_device *dev, int i2c_index)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
        struct nvkm_i2c_bus *bus = nvkm_i2c_bus_find(i2c, i2c_index);
        if (bus) {
                return nvkm_i2c_bus_probe(bus, "TV encoder",
        struct drm_encoder *encoder;
        struct drm_device *dev = connector->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
        struct nvkm_i2c_bus *bus = nvkm_i2c_bus_find(i2c, entry->i2c_index);
        int type, ret;
 
 
 {
        struct drm_device *dev = encoder->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_gpio *gpio = nvxx_gpio(&drm->device);
+       struct nvkm_gpio *gpio = nvxx_gpio(&drm->client.device);
        uint32_t testval, regoffset = nv04_dac_output_offset(encoder);
        uint32_t gpio0, gpio1, fp_htotal, fp_hsync_start, fp_hsync_end,
                fp_control, test_ctrl, dacclk, ctv_14, ctv_1c, ctv_6c;
 get_tv_detect_quirks(struct drm_device *dev, uint32_t *pin_mask)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
 
        if (device->quirk && device->quirk->tv_pin_mask) {
                *pin_mask = device->quirk->tv_pin_mask;
                return connector_status_disconnected;
 
        if (reliable) {
-               if (drm->device.info.chipset == 0x42 ||
-                   drm->device.info.chipset == 0x43)
+               if (drm->client.device.info.chipset == 0x42 ||
+                   drm->client.device.info.chipset == 0x43)
                        tv_enc->pin_mask =
                                nv42_tv_sample_load(encoder) >> 28 & 0xe;
                else
 {
        struct drm_device *dev = encoder->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_gpio *gpio = nvxx_gpio(&drm->device);
+       struct nvkm_gpio *gpio = nvxx_gpio(&drm->client.device);
        struct nv17_tv_state *regs = &to_tv_enc(encoder)->state;
        struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder);
 
        /* Set the DACCLK register */
        dacclk = (NVReadRAMDAC(dev, 0, dacclk_off) & ~0x30) | 0x1;
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE)
                dacclk |= 0x1a << 16;
 
        if (tv_norm->kind == CTV_ENC_MODE) {
                        tv_regs->ptv_614 = 0x13;
                }
 
-               if (drm->device.info.family >= NV_DEVICE_INFO_V0_RANKINE) {
+               if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_RANKINE) {
                        tv_regs->ptv_500 = 0xe8e0;
                        tv_regs->ptv_504 = 0x1710;
                        tv_regs->ptv_604 = 0x0;
        nv17_tv_state_load(dev, &to_tv_enc(encoder)->state);
 
        /* This could use refinement for flatpanels, but it should work */
-       if (drm->device.info.chipset < 0x44)
+       if (drm->client.device.info.chipset < 0x44)
                NVWriteRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL +
                                        nv04_dac_output_offset(encoder),
                                        0xf0000000);
 
 static inline void nv_write_ptv(struct drm_device *dev, uint32_t reg,
                                uint32_t val)
 {
-       struct nvif_device *device = &nouveau_drm(dev)->device;
+       struct nvif_device *device = &nouveau_drm(dev)->client.device;
        nvif_wr32(&device->object, reg, val);
 }
 
 static inline uint32_t nv_read_ptv(struct drm_device *dev, uint32_t reg)
 {
-       struct nvif_device *device = &nouveau_drm(dev)->device;
+       struct nvif_device *device = &nouveau_drm(dev)->client.device;
        return nvif_rd32(&device->object, reg);
 }
 
 
 s32
 nouveau_abi16_swclass(struct nouveau_drm *drm)
 {
-       switch (drm->device.info.family) {
+       switch (drm->client.device.info.family) {
        case NV_DEVICE_INFO_V0_TNT:
                return NVIF_CLASS_SW_NV04;
        case NV_DEVICE_INFO_V0_CELSIUS:
 {
        struct nouveau_cli *cli = nouveau_cli(file_priv);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        struct nvkm_gr *gr = nvxx_gr(device);
        struct drm_nouveau_getparam *getparam = data;
 
 
 nv40_get_intensity(struct backlight_device *bd)
 {
        struct nouveau_drm *drm = bl_get_data(bd);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        int val = (nvif_rd32(device, NV40_PMC_BACKLIGHT) &
                                   NV40_PMC_BACKLIGHT_MASK) >> 16;
 
 nv40_set_intensity(struct backlight_device *bd)
 {
        struct nouveau_drm *drm = bl_get_data(bd);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        int val = bd->props.brightness;
        int reg = nvif_rd32(device, NV40_PMC_BACKLIGHT);
 
 nv40_backlight_init(struct drm_connector *connector)
 {
        struct nouveau_drm *drm = nouveau_drm(connector->dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        struct backlight_properties props;
        struct backlight_device *bd;
        struct backlight_connector bl_connector;
 {
        struct nouveau_encoder *nv_encoder = bl_get_data(bd);
        struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        int or = nv_encoder->or;
        u32 div = 1025;
        u32 val;
 {
        struct nouveau_encoder *nv_encoder = bl_get_data(bd);
        struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        int or = nv_encoder->or;
        u32 div = 1025;
        u32 val = (bd->props.brightness * div) / 100;
 {
        struct nouveau_encoder *nv_encoder = bl_get_data(bd);
        struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        int or = nv_encoder->or;
        u32 div, val;
 
 {
        struct nouveau_encoder *nv_encoder = bl_get_data(bd);
        struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        int or = nv_encoder->or;
        u32 div, val;
 
 nv50_backlight_init(struct drm_connector *connector)
 {
        struct nouveau_drm *drm = nouveau_drm(connector->dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        struct nouveau_encoder *nv_encoder;
        struct backlight_properties props;
        struct backlight_device *bd;
        if (!nvif_rd32(device, NV50_PDISP_SOR_PWM_CTL(nv_encoder->or)))
                return 0;
 
-       if (drm->device.info.chipset <= 0xa0 ||
-           drm->device.info.chipset == 0xaa ||
-           drm->device.info.chipset == 0xac)
+       if (drm->client.device.info.chipset <= 0xa0 ||
+           drm->client.device.info.chipset == 0xaa ||
+           drm->client.device.info.chipset == 0xac)
                ops = &nv50_bl_ops;
        else
                ops = &nva3_bl_ops;
 nouveau_backlight_init(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        struct drm_connector *connector;
 
        if (apple_gmux_present()) {
 
         */
 
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        struct nvbios *bios = &drm->vbios;
        uint8_t lvds_ver = bios->data[bios->fp.lvdsmanufacturerpointer];
        uint32_t sel_clk_binding, sel_clk;
 get_fp_strap(struct drm_device *dev, struct nvbios *bios)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
 
        /*
         * The fp strap is normally dictated by the "User Strap" in
        if (bios->major_version < 5 && bios->data[0x48] & 0x4)
                return NVReadVgaCrtc5758(dev, 0, 0xf) & 0xf;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_MAXWELL)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_MAXWELL)
                return nvif_rd32(device, 0x001800) & 0x0000000f;
        else
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA)
                return (nvif_rd32(device, NV_PEXTDEV_BOOT_0) >> 24) & 0xf;
        else
                return (nvif_rd32(device, NV_PEXTDEV_BOOT_0) >> 16) & 0xf;
         */
 
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        struct nvbios *bios = &drm->vbios;
        int cv = bios->chip_version;
        uint16_t clktable = 0, scriptptr;
        struct nouveau_drm *drm = nouveau_drm(dev);
        u8 *dcb = NULL;
 
-       if (drm->device.info.family > NV_DEVICE_INFO_V0_TNT)
+       if (drm->client.device.info.family > NV_DEVICE_INFO_V0_TNT)
                dcb = ROMPTR(dev, drm->vbios.data[0x36]);
        if (!dcb) {
                NV_WARN(drm, "No DCB data found in VBIOS\n");
         */
 
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        uint8_t bytes_to_write;
        uint16_t hwsq_entry_offset;
        int i;
 static bool NVInitVBIOS(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_bios *bios = nvxx_bios(&drm->device);
+       struct nvkm_bios *bios = nvxx_bios(&drm->client.device);
        struct nvbios *legacy = &drm->vbios;
 
        memset(legacy, 0, sizeof(struct nvbios));
        struct nouveau_drm *drm = nouveau_drm(dev);
        unsigned htotal;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA)
                return true;
 
        htotal  = NVReadVgaCrtc(dev, 0, 0x06);
 
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        int i = reg - drm->tile.reg;
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
        struct nvkm_fb *fb = device->fb;
        struct nvkm_fb_tile *tile = &fb->tile.region[i];
 
                   u32 size, u32 pitch, u32 flags)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_fb *fb = nvxx_fb(&drm->device);
+       struct nvkm_fb *fb = nvxx_fb(&drm->client.device);
        struct nouveau_drm_tile *tile, *found = NULL;
        int i;
 
                       int *align, int *size)
 {
        struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
 
        if (device->info.family < NV_DEVICE_INFO_V0_TESLA) {
                if (nvbo->tile_mode) {
        nvbo->bo.bdev = &drm->ttm.bdev;
        nvbo->cli = cli;
 
-       if (!nvxx_device(&drm->device)->func->cpu_coherent)
+       if (!nvxx_device(&drm->client.device)->func->cpu_coherent)
                nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
 
        nvbo->page_shift = 12;
 set_placement_range(struct nouveau_bo *nvbo, uint32_t type)
 {
        struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev);
-       u32 vram_pages = drm->device.info.ram_size >> PAGE_SHIFT;
+       u32 vram_pages = drm->client.device.info.ram_size >> PAGE_SHIFT;
        unsigned i, fpfn, lpfn;
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CELSIUS &&
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CELSIUS &&
            nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM) &&
            nvbo->bo.mem.num_pages < vram_pages / 4) {
                /*
        if (ret)
                return ret;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA &&
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA &&
            memtype == TTM_PL_FLAG_VRAM && contig) {
                if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) {
                        if (bo->mem.mem_type == TTM_PL_VRAM) {
 nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
 {
        struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev);
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
        struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
        int i;
 
 nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo)
 {
        struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev);
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
        struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
        int i;
 
                                         TTM_PL_FLAG_WC;
                man->default_caching = TTM_PL_FLAG_WC;
 
-               if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
+               if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
                        /* Some BARs do not support being ioremapped WC */
-                       if (nvxx_bar(&drm->device)->iomap_uncached) {
+                       if (nvxx_bar(&drm->client.device)->iomap_uncached) {
                                man->available_caching = TTM_PL_FLAG_UNCACHED;
                                man->default_caching = TTM_PL_FLAG_UNCACHED;
                        }
                }
                break;
        case TTM_PL_TT:
-               if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA)
+               if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA)
                        man->func = &nouveau_gart_manager;
                else
                if (!drm->agp.bridge)
         * old nvkm_mem node, these will get cleaned up after ttm has
         * destroyed the ttm_mem_reg
         */
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
                ret = nouveau_bo_move_prep(drm, bo, new_mem);
                if (ret)
                        return ret;
        if (new_mem->mem_type != TTM_PL_VRAM)
                return 0;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) {
                *new_tile = nv10_bo_set_tiling(dev, offset, new_mem->size,
                                                nvbo->tile_mode,
                                                nvbo->tile_flags);
        if (nvbo->pin_refcnt)
                NV_WARN(drm, "Moving pinned object %p!\n", nvbo);
 
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA) {
                ret = nouveau_bo_vm_bind(bo, new_mem, &new_tile);
                if (ret)
                        return ret;
                ret = ttm_bo_move_memcpy(bo, intr, no_wait_gpu, new_mem);
 
 out:
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA) {
                if (ret)
                        nouveau_bo_vm_cleanup(bo, NULL, &new_tile);
                else
 {
        struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
        struct nouveau_drm *drm = nouveau_bdev(bdev);
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
        struct nvkm_mem *node = mem->mm_node;
        int ret;
 
                        mem->bus.is_iomem = !drm->agp.cma;
                }
 #endif
-               if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA || !node->memtype)
+               if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA || !node->memtype)
                        /* untiled */
                        break;
                /* fallthrough, tiled memory */
                mem->bus.offset = mem->start << PAGE_SHIFT;
                mem->bus.base = device->func->resource_addr(device, 1);
                mem->bus.is_iomem = true;
-               if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
-                       struct nvkm_bar *bar = nvxx_bar(&drm->device);
+               if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
+                       struct nvkm_bar *bar = nvxx_bar(&drm->client.device);
                        int page_shift = 12;
-                       if (drm->device.info.family >= NV_DEVICE_INFO_V0_FERMI)
+                       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_FERMI)
                                page_shift = node->page_shift;
 
                        ret = nvkm_bar_umap(bar, node->size << 12, page_shift,
 {
        struct nouveau_drm *drm = nouveau_bdev(bo->bdev);
        struct nouveau_bo *nvbo = nouveau_bo(bo);
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
        u32 mappable = device->func->resource_size(device, 1) >> PAGE_SHIFT;
        int i, ret;
 
         * nothing to do here.
         */
        if (bo->mem.mem_type != TTM_PL_VRAM) {
-               if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA ||
+               if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA ||
                    !nouveau_bo_tile_layout(nvbo))
                        return 0;
 
        }
 
        /* make sure bo is in mappable vram */
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA ||
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA ||
            bo->mem.start + bo->mem.num_pages < mappable)
                return 0;
 
        }
 
        drm = nouveau_bdev(ttm->bdev);
-       device = nvxx_device(&drm->device);
+       device = nvxx_device(&drm->client.device);
        dev = drm->dev;
        pdev = device->dev;
 
                return;
 
        drm = nouveau_bdev(ttm->bdev);
-       device = nvxx_device(&drm->device);
+       device = nvxx_device(&drm->client.device);
        dev = drm->dev;
        pdev = device->dev;
 
 
        struct drm_device *dev = connector->dev;
        struct nouveau_connector *nv_connector = nouveau_connector(connector);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_gpio *gpio = nvxx_gpio(&drm->device);
+       struct nvkm_gpio *gpio = nvxx_gpio(&drm->client.device);
        struct nouveau_encoder *nv_encoder;
        struct drm_encoder *encoder;
        int i, panel = -ENODEV;
                return;
        nv_connector->detected_encoder = nv_encoder;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
                connector->interlace_allowed = true;
                connector->doublescan_allowed = true;
        } else
                connector->interlace_allowed = false;
        } else {
                connector->doublescan_allowed = true;
-               if (drm->device.info.family == NV_DEVICE_INFO_V0_KELVIN ||
-                   (drm->device.info.family == NV_DEVICE_INFO_V0_CELSIUS &&
+               if (drm->client.device.info.family == NV_DEVICE_INFO_V0_KELVIN ||
+                   (drm->client.device.info.family == NV_DEVICE_INFO_V0_CELSIUS &&
                     (dev->pdev->device & 0x0ff0) != 0x0100 &&
                     (dev->pdev->device & 0x0ff0) != 0x0150))
                        /* HW is broken */
                /* Note: these limits are conservative, some Fermi's
                 * can do 297 MHz. Unclear how this can be determined.
                 */
-               if (drm->device.info.family >= NV_DEVICE_INFO_V0_KEPLER)
+               if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_KEPLER)
                        return 297000;
-               if (drm->device.info.family >= NV_DEVICE_INFO_V0_FERMI)
+               if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_FERMI)
                        return 225000;
        }
        if (dcb->location != DCB_LOC_ON_CHIP ||
-           drm->device.info.chipset >= 0x46)
+           drm->client.device.info.chipset >= 0x46)
                return 165000;
-       else if (drm->device.info.chipset >= 0x40)
+       else if (drm->client.device.info.chipset >= 0x40)
                return 155000;
-       else if (drm->device.info.chipset >= 0x18)
+       else if (drm->client.device.info.chipset >= 0x18)
                return 135000;
        else
                return 112000;
 
        if (!drm->debugfs)
                return -ENOMEM;
 
-       ret = nvif_object_init(&drm->device.object, 0, NVIF_CLASS_CONTROL,
-                              NULL, 0, &drm->debugfs->ctrl);
+       ret = nvif_object_init(&drm->client.device.object, 0,
+                              NVIF_CLASS_CONTROL, NULL, 0,
+                              &drm->debugfs->ctrl);
        if (ret)
                return ret;
 
 
 nouveau_display_create(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
        struct nouveau_display *disp;
        int ret;
 
 
        dev->mode_config.min_width = 0;
        dev->mode_config.min_height = 0;
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_CELSIUS) {
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_CELSIUS) {
                dev->mode_config.max_width = 2048;
                dev->mode_config.max_height = 2048;
        } else
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA) {
                dev->mode_config.max_width = 4096;
                dev->mode_config.max_height = 4096;
        } else
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_FERMI) {
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_FERMI) {
                dev->mode_config.max_width = 8192;
                dev->mode_config.max_height = 8192;
        } else {
        dev->mode_config.preferred_depth = 24;
        dev->mode_config.prefer_shadow = 1;
 
-       if (drm->device.info.chipset < 0x11)
+       if (drm->client.device.info.chipset < 0x11)
                dev->mode_config.async_page_flip = false;
        else
                dev->mode_config.async_page_flip = true;
                int i;
 
                for (i = 0, ret = -ENODEV; ret && i < ARRAY_SIZE(oclass); i++) {
-                       ret = nvif_object_init(&drm->device.object, 0,
+                       ret = nvif_object_init(&drm->client.device.object, 0,
                                               oclass[i], NULL, 0, &disp->disp);
                }
 
        args->size = roundup(args->size, PAGE_SIZE);
 
        /* Use VRAM if there is any ; otherwise fallback to system memory */
-       if (nouveau_drm(dev)->device.info.ram_size != 0)
+       if (nouveau_drm(dev)->client.device.info.ram_size != 0)
                domain = NOUVEAU_GEM_DOMAIN_VRAM;
        else
                domain = NOUVEAU_GEM_DOMAIN_GART;
 
 {
        nvkm_vm_ref(NULL, &nvxx_client(&cli->base)->vm, NULL);
        usif_client_fini(cli);
+       nvif_device_fini(&cli->device);
        nvif_client_fini(&cli->base);
 }
 
                goto done;
        }
 
+       ret = nvif_device_init(&cli->base.object, 0, NV_DEVICE,
+                              &(struct nv_device_v0) {
+                                       .device = ~0,
+                              }, sizeof(struct nv_device_v0),
+                              &cli->device);
+       if (ret) {
+               NV_ERROR(drm, "Device allocation failed: %d\n", ret);
+               goto done;
+       }
+
 done:
        if (ret)
                nouveau_cli_fini(cli);
 static void
 nouveau_accel_init(struct nouveau_drm *drm)
 {
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        struct nvif_sclass *sclass;
        u32 arg0, arg1;
        int ret, i, n;
        }
 
        if (device->info.family >= NV_DEVICE_INFO_V0_KEPLER) {
-               ret = nouveau_channel_new(drm, &drm->device,
+               ret = nouveau_channel_new(drm, &drm->client.device,
                                          NVA06F_V0_ENGINE_CE0 |
                                          NVA06F_V0_ENGINE_CE1,
                                          0, &drm->cechan);
        if (device->info.chipset >= 0xa3 &&
            device->info.chipset != 0xaa &&
            device->info.chipset != 0xac) {
-               ret = nouveau_channel_new(drm, &drm->device,
+               ret = nouveau_channel_new(drm, &drm->client.device,
                                          NvDmaFB, NvDmaTT, &drm->cechan);
                if (ret)
                        NV_ERROR(drm, "failed to create ce channel, %d\n", ret);
                arg1 = NvDmaTT;
        }
 
-       ret = nouveau_channel_new(drm, &drm->device, arg0, arg1, &drm->channel);
+       ret = nouveau_channel_new(drm, &drm->client.device,
+                                 arg0, arg1, &drm->channel);
        if (ret) {
                NV_ERROR(drm, "failed to create kernel channel, %d\n", ret);
                nouveau_accel_fini(drm);
        }
 
        if (device->info.family < NV_DEVICE_INFO_V0_FERMI) {
-               ret = nvkm_gpuobj_new(nvxx_device(&drm->device), 32, 0, false,
-                                     NULL, &drm->notify);
+               ret = nvkm_gpuobj_new(nvxx_device(&drm->client.device), 32, 0,
+                                     false, NULL, &drm->notify);
                if (ret) {
                        NV_ERROR(drm, "failed to allocate notifier, %d\n", ret);
                        nouveau_accel_fini(drm);
        if (ret)
                return ret;
 
+       dev->irq_enabled = true;
+
        nvxx_client(&drm->client.base)->debug =
                nvkm_dbgopt(nouveau_debug, "DRM");
 
 
        nouveau_get_hdmi_dev(drm);
 
-       ret = nvif_device_init(&drm->client.base.object, 0, NV_DEVICE,
-                              &(struct nv_device_v0) {
-                                       .device = ~0,
-                              }, sizeof(struct nv_device_v0),
-                              &drm->device);
-       if (ret)
-               goto fail_device;
-
-       dev->irq_enabled = true;
-
        /* workaround an odd issue on nvc1 by disabling the device's
         * nosnoop capability.  hopefully won't cause issues until a
         * better fix is found - assuming there is one...
         */
-       if (drm->device.info.chipset == 0xc1)
-               nvif_mask(&drm->device.object, 0x00088080, 0x00000800, 0x00000000);
+       if (drm->client.device.info.chipset == 0xc1)
+               nvif_mask(&drm->client.device.object, 0x00088080, 0x00000800, 0x00000000);
 
        nouveau_vga_init(drm);
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
-               if (!nvxx_device(&drm->device)->mmu) {
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
+               if (!nvxx_device(&drm->client.device)->mmu) {
                        ret = -ENOSYS;
                        goto fail_device;
                }
 
-               ret = nvkm_vm_new(nvxx_device(&drm->device), 0, (1ULL << 40),
-                                 0x1000, NULL, &drm->client.vm);
+               ret = nvkm_vm_new(nvxx_device(&drm->client.device),
+                                 0, (1ULL << 40), 0x1000, NULL,
+                                 &drm->client.vm);
                if (ret)
                        goto fail_device;
 
 fail_ttm:
        nouveau_vga_fini(drm);
 fail_device:
-       nvif_device_fini(&drm->device);
        nouveau_cli_fini(&drm->client);
        kfree(drm);
        return ret;
        nouveau_ttm_fini(drm);
        nouveau_vga_fini(drm);
 
-       nvif_device_fini(&drm->device);
        if (drm->hdmi_device)
                pci_dev_put(drm->hdmi_device);
        nouveau_cli_fini(&drm->client);
 {
        struct pci_dev *pdev = to_pci_dev(dev);
        struct drm_device *drm_dev = pci_get_drvdata(pdev);
-       struct nvif_device *device = &nouveau_drm(drm_dev)->device;
+       struct nvif_device *device = &nouveau_drm(drm_dev)->client.device;
        int ret;
 
        if (nouveau_runtime_pm == 0)
 
        cli->base.super = false;
 
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
-               ret = nvkm_vm_new(nvxx_device(&drm->device), 0, (1ULL << 40),
-                                 0x1000, NULL, &cli->vm);
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
+               ret = nvkm_vm_new(nvxx_device(&drm->client.device), 0,
+                                 (1ULL << 40), 0x1000, NULL, &cli->vm);
                if (ret)
                        goto done;
 
 
        struct drm_device *dev;
        struct mutex mutex;
 
+       struct nvif_device device;
+
        struct nvkm_vm *vm; /*XXX*/
        struct list_head head;
        void *abi16;
        struct nouveau_cli client;
        struct drm_device *dev;
 
-       struct nvif_device device;
        struct list_head clients;
 
        struct {
 
 {
        struct nouveau_fbdev *fbcon = info->par;
        struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        int ret;
 
        if (info->state != FBINFO_STATE_RUNNING)
 {
        struct nouveau_fbdev *fbcon = info->par;
        struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        int ret;
 
        if (info->state != FBINFO_STATE_RUNNING)
 {
        struct nouveau_fbdev *fbcon = info->par;
        struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        int ret;
 
        if (info->state != FBINFO_STATE_RUNNING)
        struct fb_info *info = fbcon->helper.fbdev;
        int ret;
 
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA)
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA)
                ret = nv04_fbcon_accel_init(info);
        else
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_FERMI)
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_FERMI)
                ret = nv50_fbcon_accel_init(info);
        else
                ret = nvc0_fbcon_accel_init(info);
                container_of(helper, struct nouveau_fbdev, helper);
        struct drm_device *dev = fbcon->helper.dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        struct fb_info *info;
        struct nouveau_framebuffer *fb;
        struct nouveau_channel *chan;
        if (ret)
                goto fini;
 
-       if (drm->device.info.ram_size <= 32 * 1024 * 1024)
+       if (drm->client.device.info.ram_size <= 32 * 1024 * 1024)
                preferred_bpp = 8;
        else
-       if (drm->device.info.ram_size <= 64 * 1024 * 1024)
+       if (drm->client.device.info.ram_size <= 64 * 1024 * 1024)
                preferred_bpp = 16;
        else
                preferred_bpp = 32;
 
         */
        nvbo->valid_domains = NOUVEAU_GEM_DOMAIN_VRAM |
                              NOUVEAU_GEM_DOMAIN_GART;
-       if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA)
+       if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA)
                nvbo->valid_domains &= domain;
 
        /* Initialize the embedded gem-object. We return a single gem-reference
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nouveau_cli *cli = nouveau_cli(file_priv);
-       struct nvkm_fb *fb = nvxx_fb(&drm->device);
+       struct nvkm_fb *fb = nvxx_fb(&drm->client.device);
        struct drm_nouveau_gem_new *req = data;
        struct nouveau_bo *nvbo = NULL;
        int ret = 0;
                        return ret;
                }
 
-               if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
+               if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA) {
                        if (nvbo->bo.offset == b->presumed.offset &&
                            ((nvbo->bo.mem.mem_type == TTM_PL_VRAM &&
                              b->presumed.domain & NOUVEAU_GEM_DOMAIN_VRAM) ||
                                      push[i].length);
                }
        } else
-       if (drm->device.info.chipset >= 0x25) {
+       if (drm->client.device.info.chipset >= 0x25) {
                ret = RING_SPACE(chan, req->nr_push * 2);
                if (ret) {
                        NV_PRINTK(err, cli, "cal_space: %d\n", ret);
                req->suffix0 = 0x00000000;
                req->suffix1 = 0x00000000;
        } else
-       if (drm->device.info.chipset >= 0x25) {
+       if (drm->client.device.info.chipset >= 0x25) {
                req->suffix0 = 0x00020000;
                req->suffix1 = 0x00000000;
        } else {
 
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        int temp = nvkm_therm_temp_get(therm);
 
        if (temp < 0)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
              therm->attr_get(therm, NVKM_THERM_ATTR_THRS_FAN_BOOST) * 1000);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
 
        if (kstrtol(buf, 10, &value) == -EINVAL)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
         therm->attr_get(therm, NVKM_THERM_ATTR_THRS_FAN_BOOST_HYST) * 1000);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
 
        if (kstrtol(buf, 10, &value) == -EINVAL)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
               therm->attr_get(therm, NVKM_THERM_ATTR_THRS_DOWN_CLK) * 1000);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
 
        if (kstrtol(buf, 10, &value) == -EINVAL)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
          therm->attr_get(therm, NVKM_THERM_ATTR_THRS_DOWN_CLK_HYST) * 1000);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
 
        if (kstrtol(buf, 10, &value) == -EINVAL)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
               therm->attr_get(therm, NVKM_THERM_ATTR_THRS_CRITICAL) * 1000);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
 
        if (kstrtol(buf, 10, &value) == -EINVAL)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
          therm->attr_get(therm, NVKM_THERM_ATTR_THRS_CRITICAL_HYST) * 1000);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
 
        if (kstrtol(buf, 10, &value) == -EINVAL)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
               therm->attr_get(therm, NVKM_THERM_ATTR_THRS_SHUTDOWN) * 1000);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
 
        if (kstrtol(buf, 10, &value) == -EINVAL)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
          therm->attr_get(therm, NVKM_THERM_ATTR_THRS_SHUTDOWN_HYST) * 1000);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
 
        if (kstrtol(buf, 10, &value) == -EINVAL)
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n", nvkm_therm_fan_sense(therm));
 }
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        int ret;
 
        ret = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MODE);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
        int ret;
 
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        int ret;
 
        ret = therm->fan_get(therm);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        int ret = -ENODEV;
        long value;
 
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        int ret;
 
        ret = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MIN_DUTY);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
        int ret;
 
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        int ret;
 
        ret = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MAX_DUTY);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
        long value;
        int ret;
 
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_volt *volt = nvxx_volt(&drm->device);
+       struct nvkm_volt *volt = nvxx_volt(&drm->client.device);
        int ret;
 
        ret = nvkm_volt_get(volt);
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_volt *volt = nvxx_volt(&drm->device);
+       struct nvkm_volt *volt = nvxx_volt(&drm->client.device);
 
        if (!volt || !volt->min_uv)
                return -ENODEV;
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_volt *volt = nvxx_volt(&drm->device);
+       struct nvkm_volt *volt = nvxx_volt(&drm->client.device);
 
        if (!volt || !volt->max_uv)
                return -ENODEV;
 {
        struct drm_device *dev = dev_get_drvdata(d);
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_iccsense *iccsense = nvxx_iccsense(&drm->device);
+       struct nvkm_iccsense *iccsense = nvxx_iccsense(&drm->client.device);
        int result = nvkm_iccsense_read_all(iccsense);
 
        if (result < 0)
 {
 #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_therm *therm = nvxx_therm(&drm->device);
-       struct nvkm_volt *volt = nvxx_volt(&drm->device);
-       struct nvkm_iccsense *iccsense = nvxx_iccsense(&drm->device);
+       struct nvkm_therm *therm = nvxx_therm(&drm->client.device);
+       struct nvkm_volt *volt = nvxx_volt(&drm->client.device);
+       struct nvkm_iccsense *iccsense = nvxx_iccsense(&drm->client.device);
        struct nouveau_hwmon *hwmon;
        struct device *hwmon_dev;
        int ret = 0;
 
 {
        struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
        struct nouveau_drm *drm = nouveau_drm(drm_dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
        u32 div, duty;
 
        div =  nvif_rd32(device, 0x61c880) & 0x00ffffff;
 {
        struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
        struct nouveau_drm *drm = nouveau_drm(drm_dev);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
 
        u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */
        u32 freq = 100; /* this is what nvidia uses and it should be good-enough */
 nouveau_led_init(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvkm_gpio *gpio = nvxx_gpio(&drm->device);
+       struct nvkm_gpio *gpio = nvxx_gpio(&drm->client.device);
        struct dcb_gpio_func logo_led;
        int ret;
 
 
        if (!nvbe)
                return NULL;
 
-       if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA)
+       if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA)
                nvbe->ttm.ttm.func = &nv04_sgdma_backend;
        else
                nvbe->ttm.ttm.func = &nv50_sgdma_backend;
 
 nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
 {
        struct nouveau_drm *drm = nouveau_bdev(man->bdev);
-       struct nvkm_fb *fb = nvxx_fb(&drm->device);
+       struct nvkm_fb *fb = nvxx_fb(&drm->client.device);
        man->priv = fb;
        return 0;
 }
                         struct ttm_mem_reg *mem)
 {
        struct nouveau_drm *drm = nouveau_bdev(man->bdev);
-       struct nvkm_ram *ram = nvxx_fb(&drm->device)->ram;
+       struct nvkm_ram *ram = nvxx_fb(&drm->client.device)->ram;
        nvkm_mem_node_cleanup(mem->mm_node);
        ram->func->put(ram, (struct nvkm_mem **)&mem->mm_node);
 }
                         struct ttm_mem_reg *mem)
 {
        struct nouveau_drm *drm = nouveau_bdev(man->bdev);
-       struct nvkm_ram *ram = nvxx_fb(&drm->device)->ram;
+       struct nvkm_ram *ram = nvxx_fb(&drm->client.device)->ram;
        struct nouveau_bo *nvbo = nouveau_bo(bo);
        struct nvkm_mem *node;
        u32 size_nc = 0;
        int ret;
 
-       if (drm->device.info.ram_size == 0)
+       if (drm->client.device.info.ram_size == 0)
                return -ENOMEM;
 
        if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG)
 
        node->page_shift = 12;
 
-       switch (drm->device.info.family) {
+       switch (drm->client.device.info.family) {
        case NV_DEVICE_INFO_V0_TNT:
        case NV_DEVICE_INFO_V0_CELSIUS:
        case NV_DEVICE_INFO_V0_KELVIN:
        case NV_DEVICE_INFO_V0_CURIE:
                break;
        case NV_DEVICE_INFO_V0_TESLA:
-               if (drm->device.info.chipset != 0x50)
+               if (drm->client.device.info.chipset != 0x50)
                        node->memtype = (nvbo->tile_flags & 0x7f00) >> 8;
                break;
        case NV_DEVICE_INFO_V0_FERMI:
                break;
        default:
                NV_WARN(drm, "%s: unhandled family type %x\n", __func__,
-                       drm->device.info.family);
+                       drm->client.device.info.family);
                break;
        }
 
 nv04_gart_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
 {
        struct nouveau_drm *drm = nouveau_bdev(man->bdev);
-       struct nvkm_mmu *mmu = nvxx_mmu(&drm->device);
+       struct nvkm_mmu *mmu = nvxx_mmu(&drm->client.device);
        struct nv04_mmu *priv = (void *)mmu;
        struct nvkm_vm *vm = NULL;
        nvkm_vm_ref(priv->vm, &vm, NULL);
 int
 nouveau_ttm_init(struct nouveau_drm *drm)
 {
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
        struct nvkm_pci *pci = device->pci;
        struct drm_device *dev = drm->dev;
        u8 bits;
                drm->agp.cma = pci->agp.cma;
        }
 
-       bits = nvxx_mmu(&drm->device)->dma_bits;
-       if (nvxx_device(&drm->device)->func->pci) {
+       bits = nvxx_mmu(&drm->client.device)->dma_bits;
+       if (nvxx_device(&drm->client.device)->func->pci) {
                if (drm->agp.bridge)
                        bits = 32;
        } else if (device->func->tegra) {
        }
 
        /* VRAM init */
-       drm->gem.vram_available = drm->device.info.ram_user;
+       drm->gem.vram_available = drm->client.device.info.ram_user;
 
        arch_io_reserve_memtype_wc(device->func->resource_addr(device, 1),
                                   device->func->resource_size(device, 1));
 
        /* GART init */
        if (!drm->agp.bridge) {
-               drm->gem.gart_available = nvxx_mmu(&drm->device)->limit;
+               drm->gem.gart_available = nvxx_mmu(&drm->client.device)->limit;
        } else {
                drm->gem.gart_available = drm->agp.size;
        }
 void
 nouveau_ttm_fini(struct nouveau_drm *drm)
 {
-       struct nvkm_device *device = nvxx_device(&drm->device);
+       struct nvkm_device *device = nvxx_device(&drm->client.device);
 
        ttm_bo_clean_mm(&drm->ttm.bdev, TTM_PL_VRAM);
        ttm_bo_clean_mm(&drm->ttm.bdev, TTM_PL_TT);
 
 nouveau_vga_set_decode(void *priv, bool state)
 {
        struct nouveau_drm *drm = nouveau_drm(priv);
-       struct nvif_object *device = &drm->device.object;
+       struct nvif_object *device = &drm->client.device.object;
 
-       if (drm->device.info.family == NV_DEVICE_INFO_V0_CURIE &&
-           drm->device.info.chipset >= 0x4c)
+       if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE &&
+           drm->client.device.info.chipset >= 0x4c)
                nvif_wr32(device, 0x088060, state);
        else
-       if (drm->device.info.chipset >= 0x40)
+       if (drm->client.device.info.chipset >= 0x40)
                nvif_wr32(device, 0x088054, state);
        else
                nvif_wr32(device, 0x001854, state);
 
        struct drm_device *dev = nfbdev->helper.dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nouveau_channel *chan = drm->channel;
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        int surface_fmt, pattern_fmt, rect_fmt;
        int ret;
 
 
        args.base.target = NV_DMA_V0_TARGET_VRAM;
        args.base.access = NV_DMA_V0_ACCESS_RDWR;
        args.base.start  = 0;
-       args.base.limit  = drm->device.info.ram_user - 1;
+       args.base.limit  = drm->client.device.info.ram_user - 1;
 
-       if (drm->device.info.chipset < 0x80) {
+       if (drm->client.device.info.chipset < 0x80) {
                args.nv50.part = NV50_DMA_V0_PART_256;
                argc += sizeof(args.nv50);
        } else
-       if (drm->device.info.chipset < 0xc0) {
+       if (drm->client.device.info.chipset < 0xc0) {
                args.nv50.part = NV50_DMA_V0_PART_256;
                args.nv50.kind = kind;
                argc += sizeof(args.nv50);
        } else
-       if (drm->device.info.chipset < 0xd0) {
+       if (drm->client.device.info.chipset < 0xd0) {
                args.gf100.kind = kind;
                argc += sizeof(args.gf100);
        } else {
        asyw->image.kind = (fb->nvbo->tile_flags & 0x0000ff00) >> 8;
        if (asyw->image.kind) {
                asyw->image.layout = 0;
-               if (drm->device.info.chipset >= 0xc0)
+               if (drm->client.device.info.chipset >= 0xc0)
                        asyw->image.block = fb->nvbo->tile_mode >> 4;
                else
                        asyw->image.block = fb->nvbo->tile_mode;
 {
        struct nouveau_drm *drm = nouveau_drm(wndw->plane.dev);
        struct nv50_disp *disp = nv50_disp(wndw->plane.dev);
-       if (nvif_msec(&drm->device, 2000ULL,
+       if (nvif_msec(&drm->client.device, 2000ULL,
                u32 data = nouveau_bo_rd32(disp->sync, asyw->ntfy.offset / 4);
                if ((data & 0xc0000000) == 0x40000000)
                        break;
                return ret;
        }
 
-       ret = nv50_base_create(&drm->device, disp->disp, base->id,
+       ret = nv50_base_create(&drm->client.device, disp->disp, base->id,
                               disp->sync->bo.offset, &base->chan);
        if (ret)
                return ret;
 nv50_head_create(struct drm_device *dev, int index)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       struct nvif_device *device = &drm->device;
+       struct nvif_device *device = &drm->client.device;
        struct nv50_disp *disp = nv50_disp(dev);
        struct nv50_head *head;
        struct nv50_base *base;
 nv50_dac_create(struct drm_connector *connector, struct dcb_output *dcbe)
 {
        struct nouveau_drm *drm = nouveau_drm(connector->dev);
-       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
        struct nvkm_i2c_bus *bus;
        struct nouveau_encoder *nv_encoder;
        struct drm_encoder *encoder;
 {
        struct nouveau_connector *nv_connector = nouveau_connector(connector);
        struct nouveau_drm *drm = nouveau_drm(connector->dev);
-       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
        struct nouveau_encoder *nv_encoder;
        struct drm_encoder *encoder;
        int type, ret;
 nv50_pior_create(struct drm_connector *connector, struct dcb_output *dcbe)
 {
        struct nouveau_drm *drm = nouveau_drm(connector->dev);
-       struct nvkm_i2c *i2c = nvxx_i2c(&drm->device);
+       struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
        struct nvkm_i2c_bus *bus = NULL;
        struct nvkm_i2c_aux *aux = NULL;
        struct i2c_adapter *ddc;
                evo_data(push, 0x00000000);
                nouveau_bo_wr32(disp->sync, 0, 0x00000000);
                evo_kick(push, core);
-               if (nvif_msec(&drm->device, 2000ULL,
+               if (nvif_msec(&drm->client.device, 2000ULL,
                        if (nouveau_bo_rd32(disp->sync, 0))
                                break;
                        usleep_range(1, 2);
 int
 nv50_display_create(struct drm_device *dev)
 {
-       struct nvif_device *device = &nouveau_drm(dev)->device;
+       struct nvif_device *device = &nouveau_drm(dev)->client.device;
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct dcb_table *dcb = &drm->vbios.dcb;
        struct drm_connector *connector, *tmp;
 
 int
 nv84_fence_create(struct nouveau_drm *drm)
 {
-       struct nvkm_fifo *fifo = nvxx_fifo(&drm->device);
+       struct nvkm_fifo *fifo = nvxx_fifo(&drm->client.device);
        struct nv84_fence_priv *priv;
        u32 domain;
        int ret;
        priv->base.uevent = true;
 
        /* Use VRAM if there is any ; otherwise fallback to system memory */
-       domain = drm->device.info.ram_size != 0 ? TTM_PL_FLAG_VRAM :
+       domain = drm->client.device.info.ram_size != 0 ? TTM_PL_FLAG_VRAM :
                         /*
                          * fences created in sysmem must be non-cached or we
                          * will lose CPU/GPU coherency!