st7735r.c (cbecf716ca618fd44feda6bd9a64a8179d031fc5) | st7735r.c (820c1707177c6fe96beed7f8cc842a683afbf890) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * DRM driver for display panels connected to a Sitronix ST7715R or ST7735R 4 * display controller in SPI mode. 5 * 6 * Copyright 2017 David Lechner <david@lechnology.com> 7 * Copyright (C) 2019 Glider bvba 8 */ --- 5 unchanged lines hidden (view full) --- 14#include <linux/module.h> 15#include <linux/property.h> 16#include <linux/spi/spi.h> 17#include <video/mipi_display.h> 18 19#include <drm/drm_atomic_helper.h> 20#include <drm/drm_drv.h> 21#include <drm/drm_fb_helper.h> | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * DRM driver for display panels connected to a Sitronix ST7715R or ST7735R 4 * display controller in SPI mode. 5 * 6 * Copyright 2017 David Lechner <david@lechnology.com> 7 * Copyright (C) 2019 Glider bvba 8 */ --- 5 unchanged lines hidden (view full) --- 14#include <linux/module.h> 15#include <linux/property.h> 16#include <linux/spi/spi.h> 17#include <video/mipi_display.h> 18 19#include <drm/drm_atomic_helper.h> 20#include <drm/drm_drv.h> 21#include <drm/drm_fb_helper.h> |
22#include <drm/drm_gem_atomic_helper.h> |
|
22#include <drm/drm_gem_cma_helper.h> | 23#include <drm/drm_gem_cma_helper.h> |
23#include <drm/drm_gem_framebuffer_helper.h> | |
24#include <drm/drm_managed.h> 25#include <drm/drm_mipi_dbi.h> 26 27#define ST7735R_FRMCTR1 0xb1 28#define ST7735R_FRMCTR2 0xb2 29#define ST7735R_FRMCTR3 0xb3 30#define ST7735R_INVCTR 0xb4 31#define ST7735R_PWCTR1 0xc0 --- 99 unchanged lines hidden (view full) --- 131out_exit: 132 drm_dev_exit(idx); 133} 134 135static const struct drm_simple_display_pipe_funcs st7735r_pipe_funcs = { 136 .enable = st7735r_pipe_enable, 137 .disable = mipi_dbi_pipe_disable, 138 .update = mipi_dbi_pipe_update, | 24#include <drm/drm_managed.h> 25#include <drm/drm_mipi_dbi.h> 26 27#define ST7735R_FRMCTR1 0xb1 28#define ST7735R_FRMCTR2 0xb2 29#define ST7735R_FRMCTR3 0xb3 30#define ST7735R_INVCTR 0xb4 31#define ST7735R_PWCTR1 0xc0 --- 99 unchanged lines hidden (view full) --- 131out_exit: 132 drm_dev_exit(idx); 133} 134 135static const struct drm_simple_display_pipe_funcs st7735r_pipe_funcs = { 136 .enable = st7735r_pipe_enable, 137 .disable = mipi_dbi_pipe_disable, 138 .update = mipi_dbi_pipe_update, |
139 .prepare_fb = drm_gem_fb_simple_display_pipe_prepare_fb, | 139 .prepare_fb = drm_gem_simple_display_pipe_prepare_fb, |
140}; 141 142static const struct st7735r_cfg jd_t18003_t01_cfg = { 143 .mode = { DRM_SIMPLE_MODE(128, 160, 28, 35) }, 144 /* Cannot read from Adafruit 1.8" display via SPI */ 145 .write_only = true, 146}; 147 --- 137 unchanged lines hidden --- | 140}; 141 142static const struct st7735r_cfg jd_t18003_t01_cfg = { 143 .mode = { DRM_SIMPLE_MODE(128, 160, 28, 35) }, 144 /* Cannot read from Adafruit 1.8" display via SPI */ 145 .write_only = true, 146}; 147 --- 137 unchanged lines hidden --- |