fb.c (f3e9632cb6241a6c098427510ad3ee041365ae64) fb.c (24c478ead0bf50a758e9dbecc7356e9eebf20271)
1/*
2 * Copyright (C) 2012-2013 Avionic Design GmbH
3 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
4 *
5 * Based on the KMS/FB CMA helpers
6 * Copyright (C) 2012 Analog Device Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify

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

144 unsigned int size, bpp;
145
146 gem = drm_gem_object_lookup(file, cmd->handles[i]);
147 if (!gem) {
148 err = -ENXIO;
149 goto unreference;
150 }
151
1/*
2 * Copyright (C) 2012-2013 Avionic Design GmbH
3 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
4 *
5 * Based on the KMS/FB CMA helpers
6 * Copyright (C) 2012 Analog Device Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify

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

144 unsigned int size, bpp;
145
146 gem = drm_gem_object_lookup(file, cmd->handles[i]);
147 if (!gem) {
148 err = -ENXIO;
149 goto unreference;
150 }
151
152 bpp = drm_format_plane_cpp(cmd->pixel_format, i);
152 bpp = drm_format_info_plane_cpp(info, i);
153
154 size = (height - 1) * cmd->pitches[i] +
155 width * bpp + cmd->offsets[i];
156
157 if (gem->size < size) {
158 err = -EINVAL;
159 goto unreference;
160 }

--- 250 unchanged lines hidden ---
153
154 size = (height - 1) * cmd->pitches[i] +
155 width * bpp + cmd->offsets[i];
156
157 if (gem->size < size) {
158 err = -EINVAL;
159 goto unreference;
160 }

--- 250 unchanged lines hidden ---