diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fb.h | 7 | ||||
-rw-r--r-- | include/linux/lcd.h | 10 | ||||
-rw-r--r-- | include/linux/reservation.h | 103 | ||||
-rw-r--r-- | include/linux/soc/amlogic/meson-canvas.h | 1 |
4 files changed, 60 insertions, 61 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 303771264644..756706b666a1 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -135,10 +135,6 @@ struct fb_cursor_user { /* A display blank is requested */ #define FB_EVENT_BLANK 0x09 -/* A hardware display blank early change occurred */ -#define FB_EARLY_EVENT_BLANK 0x10 -/* A hardware display blank revert early change occurred */ -#define FB_R_EARLY_EVENT_BLANK 0x11 struct fb_event { struct fb_info *info; @@ -721,8 +717,6 @@ extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var); extern const unsigned char *fb_firmware_edid(struct device *device); extern void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs); -extern void fb_edid_add_monspecs(unsigned char *edid, - struct fb_monspecs *specs); extern void fb_destroy_modedb(struct fb_videomode *modedb); extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb); extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); @@ -796,7 +790,6 @@ struct dmt_videomode { extern const char *fb_mode_option; extern const struct fb_videomode vesa_modes[]; -extern const struct fb_videomode cea_modes[65]; extern const struct dmt_videomode dmt_modes[]; struct fb_modelist { diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 851eee8fff25..238fb1dfed98 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h @@ -41,16 +41,6 @@ struct lcd_ops { /* Get the LCD panel power status (0: full on, 1..3: controller power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ int (*get_power)(struct lcd_device *); - /* - * Enable or disable power to the LCD(0: on; 4: off, see FB_BLANK_XXX) - * and this callback would be called proir to fb driver's callback. - * - * P.S. note that if early_set_power is not NULL then early fb notifier - * would be registered. - */ - int (*early_set_power)(struct lcd_device *, int power); - /* revert the effects of the early blank event. */ - int (*r_early_set_power)(struct lcd_device *, int power); /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ int (*set_power)(struct lcd_device *, int power); /* Get the current contrast setting (0-max_contrast) */ diff --git a/include/linux/reservation.h b/include/linux/reservation.h index 644a22dbe53b..56b782fec49b 100644 --- a/include/linux/reservation.h +++ b/include/linux/reservation.h @@ -82,50 +82,6 @@ struct reservation_object { lockdep_assert_held(&(obj)->lock.base) /** - * reservation_object_init - initialize a reservation object - * @obj: the reservation object - */ -static inline void -reservation_object_init(struct reservation_object *obj) -{ - ww_mutex_init(&obj->lock, &reservation_ww_class); - - __seqcount_init(&obj->seq, reservation_seqcount_string, &reservation_seqcount_class); - RCU_INIT_POINTER(obj->fence, NULL); - RCU_INIT_POINTER(obj->fence_excl, NULL); -} - -/** - * reservation_object_fini - destroys a reservation object - * @obj: the reservation object - */ -static inline void -reservation_object_fini(struct reservation_object *obj) -{ - int i; - struct reservation_object_list *fobj; - struct dma_fence *excl; - - /* - * This object should be dead and all references must have - * been released to it, so no need to be protected with rcu. - */ - excl = rcu_dereference_protected(obj->fence_excl, 1); - if (excl) - dma_fence_put(excl); - - fobj = rcu_dereference_protected(obj->fence, 1); - if (fobj) { - for (i = 0; i < fobj->shared_count; ++i) - dma_fence_put(rcu_dereference_protected(fobj->shared[i], 1)); - - kfree(fobj); - } - - ww_mutex_destroy(&obj->lock); -} - -/** * reservation_object_get_list - get the reservation object's * shared fence list, with update-side lock held * @obj: the reservation object @@ -184,6 +140,38 @@ reservation_object_lock_interruptible(struct reservation_object *obj, return ww_mutex_lock_interruptible(&obj->lock, ctx); } +/** + * reservation_object_lock_slow - slowpath lock the reservation object + * @obj: the reservation object + * @ctx: the locking context + * + * Acquires the reservation object after a die case. This function + * will sleep until the lock becomes available. See reservation_object_lock() as + * well. + */ +static inline void +reservation_object_lock_slow(struct reservation_object *obj, + struct ww_acquire_ctx *ctx) +{ + ww_mutex_lock_slow(&obj->lock, ctx); +} + +/** + * reservation_object_lock_slow_interruptible - slowpath lock the reservation + * object, interruptible + * @obj: the reservation object + * @ctx: the locking context + * + * Acquires the reservation object interruptible after a die case. This function + * will sleep until the lock becomes available. See + * reservation_object_lock_interruptible() as well. + */ +static inline int +reservation_object_lock_slow_interruptible(struct reservation_object *obj, + struct ww_acquire_ctx *ctx) +{ + return ww_mutex_lock_slow_interruptible(&obj->lock, ctx); +} /** * reservation_object_trylock - trylock the reservation object @@ -206,6 +194,31 @@ reservation_object_trylock(struct reservation_object *obj) } /** + * reservation_object_is_locked - is the reservation object locked + * @obj: the reservation object + * + * Returns true if the mutex is locked, false if unlocked. + */ +static inline bool +reservation_object_is_locked(struct reservation_object *obj) +{ + return ww_mutex_is_locked(&obj->lock); +} + +/** + * reservation_object_locking_ctx - returns the context used to lock the object + * @obj: the reservation object + * + * Returns the context used to lock a reservation object or NULL if no context + * was used or the object is not locked at all. + */ +static inline struct ww_acquire_ctx * +reservation_object_locking_ctx(struct reservation_object *obj) +{ + return READ_ONCE(obj->lock.ctx); +} + +/** * reservation_object_unlock - unlock the reservation object * @obj: the reservation object * @@ -271,6 +284,8 @@ reservation_object_get_excl_rcu(struct reservation_object *obj) return fence; } +void reservation_object_init(struct reservation_object *obj); +void reservation_object_fini(struct reservation_object *obj); int reservation_object_reserve_shared(struct reservation_object *obj, unsigned int num_fences); void reservation_object_add_shared_fence(struct reservation_object *obj, diff --git a/include/linux/soc/amlogic/meson-canvas.h b/include/linux/soc/amlogic/meson-canvas.h index b4dde2fbeb3f..0cb2a6050d1f 100644 --- a/include/linux/soc/amlogic/meson-canvas.h +++ b/include/linux/soc/amlogic/meson-canvas.h @@ -20,6 +20,7 @@ #define MESON_CANVAS_ENDIAN_SWAP64 0x7 #define MESON_CANVAS_ENDIAN_SWAP128 0xf +struct device; struct meson_canvas; /** |