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