appletbdrm.c
Includes Linux kernel module headerAssigns a negative errno constant
SHA-2562b275165c83285a1b76100cb9160a68cb885a63d3a188eece53f673f0c9e5238
MaleculeO(Er)H(Os)
Evidence
⋯5 lines
6 */
7
8#include <linux/align.h>
9#include <linux/array_size.h>
10#include <linux/bitops.h>
11#include <linux/bug.h>
12#include <linux/container_of.h>
13#include <linux/err.h>
14#include <linux/module.h>
15#include <linux/overflow.h>
16#include <linux/slab.h>
17#include <linux/types.h>
18#include <linux/unaligned.h>
19#include <linux/usb.h>
20
21#include <drm/drm_atomic.h>
22#include <drm/drm_atomic_helper.h>
23#include <drm/drm_crtc.h>
24#include <drm/drm_damage_helper.h>
25#include <drm/drm_drv.h>
26#include <drm/drm_encoder.h>
27#include <drm/drm_format_helper.h>
28#include <drm/drm_fourcc.h>
29#include <drm/drm_framebuffer.h>
30#include <drm/drm_gem_atomic_helper.h>
31#include <drm/drm_gem_framebuffer_helper.h>
32#include <drm/drm_gem_shmem_helper.h>
33#include <drm/drm_plane.h>
34#include <drm/drm_print.h>
35#include <drm/drm_probe_helper.h>
36
37#define APPLETBDRM_PIXEL_FORMAT cpu_to_le32(0x52474241) /* RGBA, the actual format is BGR888 */
38#define APPLETBDRM_BITS_PER_PIXEL 24
39
40#define APPLETBDRM_MSG_CLEAR_D …
168:33… doesn't match expected size (%zu)\n",
169 actual_size, size);
170 return -EIO;
171 }
172
⋯5 lines
195:9… frame after the USB device configuration is set with a readiness
196 * signal, in which case the response should be read again
197 */
198 if (response->msg …
283:23… tered unexpected bits per pixel value (%d)\n", bits_per_pixel);
284 ret = -EINVAL;
285 goto free_info;
286 }
287
288 if (pixel_format != APPLETBDRM_PIXEL_FORMAT) {
289 drm_err(drm, "Encountered unknown pixel format (%p4cl)\ …
524:5… (!appletbdrm_state)
525 return NULL;
526
527 /* Request and response are not duplicated and are allocated in .atomic_check */
528 appletbdrm_state->request = …