xref: /linux/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk20a.c (revision d0034a7a4ac7fae708146ac0059b9c47a1543f0d)
1fef94f62SAlexandre Courbot /*
260958b8fSAlexandre Courbot  * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
3fef94f62SAlexandre Courbot  *
4fef94f62SAlexandre Courbot  * Permission is hereby granted, free of charge, to any person obtaining a
5fef94f62SAlexandre Courbot  * copy of this software and associated documentation files (the "Software"),
6fef94f62SAlexandre Courbot  * to deal in the Software without restriction, including without limitation
7fef94f62SAlexandre Courbot  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8fef94f62SAlexandre Courbot  * and/or sell copies of the Software, and to permit persons to whom the
9fef94f62SAlexandre Courbot  * Software is furnished to do so, subject to the following conditions:
10fef94f62SAlexandre Courbot  *
11fef94f62SAlexandre Courbot  * The above copyright notice and this permission notice shall be included in
12fef94f62SAlexandre Courbot  * all copies or substantial portions of the Software.
13fef94f62SAlexandre Courbot  *
14fef94f62SAlexandre Courbot  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15fef94f62SAlexandre Courbot  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16fef94f62SAlexandre Courbot  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17fef94f62SAlexandre Courbot  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18fef94f62SAlexandre Courbot  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19fef94f62SAlexandre Courbot  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20fef94f62SAlexandre Courbot  * DEALINGS IN THE SOFTWARE.
21fef94f62SAlexandre Courbot  */
2203c8952fSBen Skeggs #include "priv.h"
23635cb7daSAlexandre Courbot #include "gf100.h"
24fef94f62SAlexandre Courbot 
2560958b8fSAlexandre Courbot /* GK20A's FB is similar to GF100's, but without the ability to allocate VRAM */
2603c8952fSBen Skeggs static const struct nvkm_fb_func
2703c8952fSBen Skeggs gk20a_fb = {
2860958b8fSAlexandre Courbot 	.dtor = gf100_fb_dtor,
2999c59172SBen Skeggs 	.oneinit = gf100_fb_oneinit,
3060958b8fSAlexandre Courbot 	.init = gf100_fb_init,
31c73baa83SBen Skeggs 	.init_page = gf100_fb_init_page,
3260958b8fSAlexandre Courbot 	.intr = gf100_fb_intr,
332854ab8dSBen Skeggs 	.default_bigpage = 17,
3403c8952fSBen Skeggs };
3503c8952fSBen Skeggs 
3603c8952fSBen Skeggs int
gk20a_fb_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_fb ** pfb)37b7a9369aSBen Skeggs gk20a_fb_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_fb **pfb)
3803c8952fSBen Skeggs {
39b7a9369aSBen Skeggs 	return gf100_fb_new_(&gk20a_fb, device, type, inst, pfb);
4003c8952fSBen Skeggs }
41