crtc.c (14e77332e74603efab8347c89d3cda447c3b97c9) crtc.c (a2b7eadfef5963138a5aeaba90c4f513414823c2)
1/*
2 * Copyright 1993-2003 NVIDIA, Corporation
3 * Copyright 2006 Dave Airlie
4 * Copyright 2007 Maarten Maathuis
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation

--- 748 unchanged lines hidden (view full) ---

757 if (disp->image[nv_crtc->index])
758 nouveau_bo_unpin(disp->image[nv_crtc->index]);
759 nouveau_bo_ref(NULL, &disp->image[nv_crtc->index]);
760
761 nouveau_bo_unmap(nv_crtc->cursor.nvbo);
762 nouveau_bo_unpin(nv_crtc->cursor.nvbo);
763 nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo);
764 nvif_notify_dtor(&nv_crtc->vblank);
1/*
2 * Copyright 1993-2003 NVIDIA, Corporation
3 * Copyright 2006 Dave Airlie
4 * Copyright 2007 Maarten Maathuis
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation

--- 748 unchanged lines hidden (view full) ---

757 if (disp->image[nv_crtc->index])
758 nouveau_bo_unpin(disp->image[nv_crtc->index]);
759 nouveau_bo_ref(NULL, &disp->image[nv_crtc->index]);
760
761 nouveau_bo_unmap(nv_crtc->cursor.nvbo);
762 nouveau_bo_unpin(nv_crtc->cursor.nvbo);
763 nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo);
764 nvif_notify_dtor(&nv_crtc->vblank);
765 nvif_head_dtor(&nv_crtc->head);
765 kfree(nv_crtc);
766}
767
768static void
769nv_crtc_gamma_load(struct drm_crtc *crtc)
770{
771 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
772 struct drm_device *dev = nv_crtc->base.dev;

--- 563 unchanged lines hidden (view full) ---

1336 nouveau_bo_unpin(nv_crtc->cursor.nvbo);
1337 }
1338 if (ret)
1339 nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo);
1340 }
1341
1342 nv04_cursor_init(nv_crtc);
1343
766 kfree(nv_crtc);
767}
768
769static void
770nv_crtc_gamma_load(struct drm_crtc *crtc)
771{
772 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
773 struct drm_device *dev = nv_crtc->base.dev;

--- 563 unchanged lines hidden (view full) ---

1337 nouveau_bo_unpin(nv_crtc->cursor.nvbo);
1338 }
1339 if (ret)
1340 nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo);
1341 }
1342
1343 nv04_cursor_init(nv_crtc);
1344
1345 ret = nvif_head_ctor(&disp->disp, nv_crtc->base.name, nv_crtc->index, &nv_crtc->head);
1346 if (ret)
1347 return ret;
1348
1344 ret = nvif_notify_ctor(&disp->disp.object, "kmsVbl", nv04_crtc_vblank_handler,
1345 false, NV04_DISP_NTFY_VBLANK,
1346 &(struct nvif_notify_head_req_v0) {
1347 .head = nv_crtc->index,
1348 },
1349 sizeof(struct nvif_notify_head_req_v0),
1350 sizeof(struct nvif_notify_head_rep_v0),
1351 &nv_crtc->vblank);
1352
1353 return ret;
1354}
1349 ret = nvif_notify_ctor(&disp->disp.object, "kmsVbl", nv04_crtc_vblank_handler,
1350 false, NV04_DISP_NTFY_VBLANK,
1351 &(struct nvif_notify_head_req_v0) {
1352 .head = nv_crtc->index,
1353 },
1354 sizeof(struct nvif_notify_head_req_v0),
1355 sizeof(struct nvif_notify_head_rep_v0),
1356 &nv_crtc->vblank);
1357
1358 return ret;
1359}