/*
* v4l2-tpg-colors.h - Color definitions for the test pattern generator
*
* Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*
* This program is free software; you may redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _V4L2_TPG_COLORS_H_
#define _V4L2_TPG_COLORS_H_
struct color {
unsigned char r, g, b;
};
struct color16 {
int r, g, b;
};
enum tpg_color {
TPG_COLOR_CSC_WHITE,
TPG_COLOR_CSC_YELLOW,
TPG_COLOR_CSC_CYAN,
TPG_COLOR_CSC_GREEN,
TPG_COLOR_CSC_MAGENTA,
TPG_COLOR_CSC_RED,
TPG_COLOR_CSC_BLUE,
TPG_COLOR_CSC_BLACK,
TPG_COLOR_75_YELLOW,
TPG_COLOR_75_CYAN,
TPG_COLOR_75_GREEN,
TPG_COLOR_75_MAGENTA,
TPG_COLOR_75_RED,
TPG_COLOR_75_BLUE,
TPG_COLOR_100_WHITE,
TPG_COLOR_100_YELLOW,
TPG_COLOR_100_CYAN,
TPG_COLOR_100_GREEN,
TPG_COLOR_100_MAGENTA,
TPG_COLOR_100_RED,
TPG_COLOR_100_BLUE,
TPG_COLOR_100_BLACK,
TPG_COLOR_TEXTFG,
TPG_COLOR_TEXTBG,
TPG_COLOR_RANDOM,
TPG_COLOR_RAMP,
TPG_COLOR_MAX = TPG_COLOR_RAMP + 256
};
extern const struct color tpg_colors[TPG_COLOR_MAX];
extern const unsigned short tpg_rec709_to_linear[255 * 16 + 1];
extern const unsigned short tpg_linear_to_rec709[255 * 16 + 1];
extern const struct color16 tpg_csc_colors[V4L2_COLORSPACE_DCI_P3 + 1]
[V4L2_XFER_FUNC_SMPTE2084 + 1]
[TPG_COLOR_CSC_BLACK + 1];
#endif
x/net-next.git/diff/include/pcmcia?id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4'>diff
|
Age | Commit message (Expand) | Author | Files | Lines |
cgit-panel'>diff options
x86/mce: Make timer handling more robust
Erik reported that on a preproduction hardware a CMCI storm triggers the
BUG_ON in add_timer_on(). The reason is that the per CPU MCE timer is
started by the CMCI logic before the MCE CPU hotplug callback starts the
timer with add_timer_on(). So the timer is already queued which triggers
the BUG.
Using add_timer_on() is pretty pointless in this code because the timer is
strictlty per CPU, initialized as pinned and all operations which arm the
timer happen on the CPU to which the timer belongs.
Simplify the whole machinery by using mod_timer() instead of add_timer_on()
which avoids the problem because mod_timer() can handle already queued
timers. Use __start_timer() everywhere so the earliest armed expiry time is
preserved.
Reported-by: Erik Veijola <erik.veijola@intel.com>
Tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701310936080.3457@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>